Jump to content

_FileReadToArray read a csv file


Recommended Posts

Hi All,

first of all I'm new and searched for my 'problem'.

I read a csv file like 2st 2records:

object, 0.0 , 0.0 , 0.0 ," 173,783.0 "," 165,088.0 "," 8,695.0 ", N/A ," 173,783.0 "

object, 0.0 , 0.0 , 0.0 ," 10,392.0 "," 5,386.0 "," 5,006.0 ", N/A ," 10,392.0 "

I use:

dim $Array

_FileReadToArray($location_dest & $File, $Array)

For $x = 2 to $Array[0]-1

$ArraySplit = StringSplit($Array[$x], ",")

to read the file and split each record in separate variables the problem is that eg the variable " 173,783.0 " is split into " 173 and 783.0 "

so for this field the comma is part of the variable not the fieldseparator.

Is there a 'solution' or 'workaround' for this

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...