Apache OpenOffice (AOO) Bugzilla – Issue 103939
Import of csv with weird/incorrect quoting causes remaining lines to be skipped/missed
Last modified: 2009-08-04 17:50:35 UTC
I produced some csv programatically which was incorrectly formatted. This wasn't immediately obvious since the document produced was pretty big. When I used OO calc to open the csv file, it failed in a way which I think is not desirable. For the content below, it imported only the lines up to the one with the problem, and no lines after it. Further, it gave no warning or error message that some lines were skipped. As a point of comparison, the behavior under excel was to import all of the rows, except may the one with the error. Sorry not to be more specific. I don't use excel so I'm hearing this second hand. This happened on OOO300m15 (Build:9379) Please email if you have questions. "bob" ,"jim" ""mavis "mavis ""jason"" tim "", "greg" "harold" , "david"
Created attachment 63898 [details] A file which will cause the problem in the issue
Yes, I recently looked into this. Calc's handling of mis-quoted csv files is inconsistent with how Excel handles them. Excel handles such mis-quoted csv files more gracefully, and IMO we should do the same there.
Created attachment 63900 [details] patch to fix this
Is something missing from that patch, or do you never set the bAllowQuotedMultiLine flag?
@nn: I never set the flag and have the default value set automatically (to false). Alternatively, we could remove the optional parameter and just remove the last part of the method that allows multiple lines to be read.
Then it breaks the feature to read properly-quoted multiline text (issue 834).
@nn: any suggestions?
I guess adding another option in the csv import dialog would be one way to make it work.
Let's move this to the older issue 78926. *** This issue has been marked as a duplicate of 78926 ***
closing duplicate