Open GoogleCodeExporter opened 9 years ago
Hi,
it seems for me that MS Excel garbles the csv file. Could you please provide
one example file (without real user/password data) which is able to reproduce
your issue.
Which Excel version are you using?
cheers
Frank
Original comment by Dietrich.Frank@gmail.com
on 7 Feb 2011 at 10:59
Hi Frank
2 renamed files attached
I was able to import the original when I moved this file to the desktop and
back.
When I open this file in exel only one record shows but there are 2 records?
(When I click on cel A3 and change the color it appears!)
The �secrete edit�- file I could not import.
Hopefully you could reproduce this issue.
With regards,
Hans
Original comment by rovie.h...@gmail.com
on 7 Feb 2011 at 6:01
Hi Hans,
could you please have a look again, as there is no file attached.
cheers
Frank
Original comment by Dietrich.Frank@gmail.com
on 8 Feb 2011 at 7:22
Frank,
Strange? I Zipped the files now.
I forgot to mention that I tried this with Exel 2003 and Exel 2010.
Hans
Original comment by rovie.h...@gmail.com
on 8 Feb 2011 at 8:08
Hi Hans,
I did the following check for you (as there is still no attachment).
1. create an entry in secrets
2. export to /sdcard/secrets.csv
"Description","Id","PIN","Email","Notes"
"foobar","foo","bar","john.doe@example.com","note"
3. open the file in Excel and change the color, like you wrote in comment #2
4. save the file in Excel, then you should get a warning that some Excel
features are not supported in a CSV file, see the attached screenshot
5. click on "Yes" to save the file in CSV instead of Excel format
Description,Id,PIN,Email,Notes
foobar,foo,bar,john.doe@example.com,note
The only difference in this example is, the double quotes are removed (for
fields which do not contain a comma, otherwise it would be enclosed by double
quotes). Without to see your saved file from Excel it's not much to do, to find
out what happen.
cheers
Frank
Original comment by Dietrich.Frank@gmail.com
on 9 Feb 2011 at 12:10
Attachments:
Thanks for looking into this Frank.
Looking at the code for CSVReader, I wonder if the problem is related to having
exactly one embedded double quote. For example, the code will handle these
cases:
"aaa","bbb","ccc"
aaa,bbb,ccc
aaa,b"b"b,ccc
but does not seem to handle this case:
aaa,b"bb,ccc
The code for CSVReader toggles the inQuotes state at line 174, and I'm thinking
it should not toggle that state unless the quote is at the beginning or end of
an escape sequence.
Original comment by roge...@google.com
on 9 Feb 2011 at 3:07
Original comment by roge...@google.com
on 19 May 2011 at 5:58
Original issue reported on code.google.com by
rovie.h...@gmail.com
on 6 Feb 2011 at 9:02