rshnGhost

Problem with _FileWriteFromArray()

4 posts in this topic

I have script which reads data from a csv file whose delimiter is ,(comma)

The read process is successful using

_FileReadToArray(fileName, arrayName, ",")

But while writing  back using _FileWriteToArray(fileName, arrayName, ",") the delimiter is changed to |(or symbol) but I need ,(comma) as the delimiter.

Kindly help me

Thank you

Share this post


Link to post
Share on other sites



Also it adds an extra line at the beginning of output file

ie. Number of Rows | Number of Columns

I also need to eliminate them too.

Share this post


Link to post
Share on other sites

The default delimiter is "|" when writing a 2-dimensional array. You have to override the default value. Read the help file for more details.

Share this post


Link to post
Share on other sites

Thanks

I solved it...

_FileWriteFromArray ( $sFilePath, $aArray ,1 ,Default ,",")

The makes the output file with delimiter as comma and also avoids printing row value and Column value at first list.

:sweating:

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