Issue 103939 - Import of csv with weird/incorrect quoting causes remaining lines to be skipped/missed
Summary: Import of csv with weird/incorrect quoting causes remaining lines to be skipp...
Status: CLOSED DUPLICATE of issue 78926
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 3.0.1
Hardware: All Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: spreadsheet
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-31 17:10 UTC by dk_random
Modified: 2009-08-04 17:50 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
A file which will cause the problem in the issue (75 bytes, text/csv)
2009-07-31 17:12 UTC, dk_random
no flags Details
patch to fix this (2.34 KB, patch)
2009-07-31 17:28 UTC, kyoshida
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description dk_random 2009-07-31 17:10:00 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"
Comment 1 dk_random 2009-07-31 17:12:38 UTC
Created attachment 63898 [details]
A file which will cause the problem in the issue
Comment 2 kyoshida 2009-07-31 17:26:03 UTC
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.
Comment 3 kyoshida 2009-07-31 17:28:04 UTC
Created attachment 63900 [details]
patch to fix this
Comment 4 niklas.nebel 2009-07-31 17:49:14 UTC
Is something missing from that patch, or do you never set the
bAllowQuotedMultiLine flag?
Comment 5 kyoshida 2009-07-31 18:17:05 UTC
@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.
Comment 6 niklas.nebel 2009-08-03 18:17:05 UTC
Then it breaks the feature to read properly-quoted multiline text (issue 834).
Comment 7 kyoshida 2009-08-03 18:21:41 UTC
@nn: any suggestions?
Comment 8 kyoshida 2009-08-04 14:59:12 UTC
I guess adding another option in the csv import dialog would be one way to make
it work.
Comment 9 niklas.nebel 2009-08-04 17:49:57 UTC
Let's move this to the older issue 78926.

*** This issue has been marked as a duplicate of 78926 ***
Comment 10 niklas.nebel 2009-08-04 17:50:35 UTC
closing duplicate