Reg: Read data from .csv file

Hi Support,

I have a .csv file with data in multiple columns.

To reterive data from cell(1,2), i use the following code.

Put file “Filepath” into test
set the itemdelimiter to “;”
put item 2 of line 2 of test.

It displayed the result correctly.

But now i am getting error. Please see screen shot and Help me soon to resolve this.

Your CSV file is not stored in UTF8 format, which is the default encoding for eggPlant.

You can either save your CSV file in UTF8 or you can set the encoding with a line like this:

set the defaultStringEncoding to "Unicode (UTF-32)"

You can see all the available encodings with:

put the availableStringEncodings

Is there a way to get an entire column from a csv file?

Try this:

set myCSVText to {{
put item 2 of each line of myCSVText

You should see (A,B,C).