Hello! I'm importing a CSV file into a table (using loadCSV, of course). The file has this format:
"Name 1"; "This is the first name"; "This is another column for the first name"
"Name 2"; "This is the second name"; "This is another column for the second name"
etc...
The problem is, loadCSV cuts strings strictly at the separator character, loading everything else into the cell, including the delimiting double-quotes and even the spaces after the semicolons but out of the quotes. So, instead of the expected:
[Name 1][This is the first name][This is another column for the first name]
...I get:
["Name 1"][ "This is the first name"][ "This is another column for the first name"]
(brackets added for clarity and to show spaces inside the cells).
Yes, I know I can parse cell by cell and remove leading spaces and quotes using simple string functions, but I would like a more "elegant" solution. Anyone knows any, or can think of a more decent workaround?
Erel, maybe a new, optional "Delimiter" parameter would be a good idea for loadCSV?
P.S: I tried both comma and semi-colon as delimiters. Same results.
"Name 1"; "This is the first name"; "This is another column for the first name"
"Name 2"; "This is the second name"; "This is another column for the second name"
etc...
The problem is, loadCSV cuts strings strictly at the separator character, loading everything else into the cell, including the delimiting double-quotes and even the spaces after the semicolons but out of the quotes. So, instead of the expected:
[Name 1][This is the first name][This is another column for the first name]
...I get:
["Name 1"][ "This is the first name"][ "This is another column for the first name"]
(brackets added for clarity and to show spaces inside the cells).
Yes, I know I can parse cell by cell and remove leading spaces and quotes using simple string functions, but I would like a more "elegant" solution. Anyone knows any, or can think of a more decent workaround?
Erel, maybe a new, optional "Delimiter" parameter would be a good idea for loadCSV?
P.S: I tried both comma and semi-colon as delimiters. Same results.