Skip to Content
Jan 23, 2020 at 10:50 AM

Read CSV file with SAP iRPA with



I am trying to read a csv file with the function, but it is not outputting anything in the output variable.

The contents of my input file 'variants.csv' file (encoding UTF8):


This is my input to the function:

Which relates to following line of code:

// Read a CSV file.
rootData.SAPData.Variants = ctx.json.CSV2Object("C:\\Users\\<user>\\Documents\\Solution CE&O\\Customers\\<customer>\\dumpfolder\\variants.csv", e.file.encoding.UTF8), ';');

But when running the code and putting a watch on the output variable 'Variants', it does not display the values. Only a length parameter does appear:

Did someone encountered this before? Does someone see where I am wrong?

PS: The path to the file is correct, because when I launch the ctx.fso.file.delete with the same parameters, it deletes the file.

Thank you!