Jump to content

Recommended Posts

Posted

Can someone point me in the right direction.   I have a csv file that I create from an xlsx file.  In excel all the columns are correct.  Put when I try to read the csv file to an array I am getting error 3(file lines have different numbers of fields).  So here is where I need the help.   I found why I am having different number of fields.   On some lines in the csv file I have data that looks like this:    data, data, "data, data", data, data.   The issue is the comma between the data within the quotes.  How would I find just the data between the quote and replace the comma with a space?

so in excel 

Column 1           Column 2           Column 3      Column 4

data                     data                    data                data

data                    data                 "data, data"       data

In array  when using the comma as a delimiter it see Column 3  "data, data"  as two(2) fields.  

So I am thinking to just replace "data, data"  with "data data"  but really not sure how to do that

 Thank you

  • xcaliber13 changed the title to StringReplace Help needed(Solved)

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
×
×
  • Create New...