[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Addressing CSV import/export in kspread for koffice-1.5
From:       Philippe Rigault <prigault () oricom ! ca>
Date:       2006-02-05 5:37:05
Message-ID: 200602050037.05111.prigault () oricom ! ca
[Download RAW message or body]

Hello,

I am done with coding the largest part of the improvements that I mentioned.

You can find patches at
http://bugs.kde.org/show_bug.cgi?id=121396
which is a meta bug I created to track this issue.

Please review the current patch and commit it if you like it.

As David Faure mentioned, the import filter looks OK, it is the export that is 
very flawed.

Best,

Philippe

On Thursday 02 February 2006 10:22, you wrote:
> Dear kspread developers,
>
> The status of Text/CSV import/export in kspread has always been far from
> satisfactory, and keeps many users from using koffice at all. In that
> regard, kspread is neither compatible with OpenOffice.org, MSExcel, not
> with kspread itself.
>
> I would like to help fix this for 1.5 final, which I think is a reasonable
> goal because  few modifications are actually required to make this
> possible. My proposal aims at no less than changing kspread from the worst
> text/csv spreadsheet app (among the Koffice/MS/OO.org trio) to the best one
> before mid-march.
>
> I guess kspread developers are aware of CSV idiosyncrasies (including the
> fact that no standard defines it, that MSExcel itself cannot read/write CSV
> across different locales), so I will not elaborate much here. Suffice is to
> say that the proposed modifications address all current bugs while becoming
> compatible with both OpenOffice.org and MSExcel.
>
> IMPORTANT: these modifications do not introduce new features or translation
> strings, they just fix inconsistent behaviour, so they can happen at this
> feature-frozen stage.
>
> Proposal: help implement the following modifications.
>
> 1. Export
> - Systematically quote all fields,even empty ones
> - Protect quote characters (single or double quote) in every field by
> replacing each quote character by two consecutive quote characters (same
> behaviour as OpenOffice.org and MSExcel).
> - Disallow quotes (both single and double) in Cells -> Delimiter -> Other.
>
> These three modifications combined would actually solve all CSV problems I
> know of currently, including:
>  Bug 109797:    CSV export does not enclose all cells in quotes
>  Bug 95552: Exporting numbers as CSV may turn them into strings
>
> 2. Import
> Parsing a Text/CSV file correctly is more a bit complicated that it may
> seem at first sight, in particular it cannot be done simply by first
> splitting each line with the delimiter character. One needs a real parser
> with states to deal with quote character within fields.
>
> In addition, I would like to help address this bug, which is another reason
> keeping users from koffice.
>  Bug 109847: Kspread cannot open TAB-delimited text files with .xls
> extension
>
> I would like to get the agreement of the team and then contribute the
> modifications with kspread developers to have them ready for beta2 (which I
> will be able to test at the same time as other packagers).
>
> Let me know how best to achieve this,
>
> Best regards,
>
> Philippe Rigault
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic