You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you attach the same file once as a correct CSV and once as a correct spreadsheet, for example a .ods, .xls or .xlsx file? By correct I mean the exact way you expect it.
That way, I can better understand what you expect.
If you want to preserve "" in cells, first try @jimeh’s suggestion below. If that doesn’t work at all and you control both producer and consumer of the files, maybe it helps to change the enclosing char using $csv->enclosure = "!";, assuming your file does not contain any literal ! characters. See https://github.com/parsecsv/parsecsv-for-php/blob/main/src/Csv.php#L106
If you want two literal double quote characters as the value of a field, the correct way to encode them as CSV is to quote the field, and escape the double quotes, by making each one two double quotes:
basically if a empty cell has "", it will be converter in , only... and it's wrong...
my code (but doesn't work)
The text was updated successfully, but these errors were encountered: