Sign in to follow this  
Followers 0
doerak88

_FileReadToArray read a csv file

4 posts in this topic

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

Share this post


Link to post
Share on other sites



I've used this udf

Share this post


Link to post
Share on other sites

I've used this udf

Thanks, this is working fine!! many thanks.

Share this post


Link to post
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
Sign in to follow this  
Followers 0