Importing Data Using a CSV File (Doc ID 507576.1)

Last updated on JULY 04, 2017

Applies to:

Siebel Tools - Version 7.7.2 [18325] to 8.2.2.1 SIA[23012] [Release V7 to V8]
Information in this document applies to any platform.

Symptoms

When trying to import Account data from a .CSV file using a Custom Business Service, all data is being imported successfully, except when trying to read Account Name which is in this format ABC "Corp" Main.

The code used is:

if(MethodName=="TEST")
    {
    var ofile=Clib.fopen("D:\\a.csv", "rt");
    if (ofile==null)
      TheApplication().RaiseErrorText("Error in opening the file");
    else   
      {
      var line;
      var i=0;
      while (null!=(line=Clib.fgets(ofile)))
        {
        var array=new Array();
        array=line.split(",");
        var a0=array[0];
        var a1= array[1]
        }//while
      }//else
    return(Cancel Operation);
    }



array[1] holds Account Name: ABC "Corp" Main
When  assigning a1=array[1] instead of assigning   ABC "Corp" Main    it is assigned as  "ABC""Corp""Main"

How to read the data as it is when data contains quotes("")?
 

Changes

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms