Bug 38880 - Precision in CSV import
Summary: Precision in CSV import
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, needsDevEval, skillCpp
Depends on:
Blocks:
 
Reported: 2011-07-01 06:29 UTC by Björn Michaelsen
Modified: 2015-12-15 16:58 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2011-07-01 06:29:51 UTC
Precision in CSV import

Background: When importing a CSV file, LO currently ignores the precision of the import cells. A CSV line like

100.0,200.20,300.000

would be shown within Calc as

100.1 200.2 300

Skills: C++, building, debugging
Comment 1 Kohei Yoshida 2011-08-09 16:55:06 UTC
This may not be as easy as it may appear since it deals with number formats.
Comment 2 Nguyen Vu Hung 2011-08-16 21:38:16 UTC
Hi Bjorn and Yoshida-san, 

Please point me to links of the source code (on opengrok) and functions to look at.

Thanks.
Comment 3 Kohei Yoshida 2011-08-17 21:22:28 UTC
(In reply to comment #2)
> Hi Bjorn and Yoshida-san, 
> 
> Please point me to links of the source code (on opengrok) and functions to look
> at.

Actually, I've downgraded this to ProposedEasyHack due to some potential difficulties and also performance implications.  So, this is technically not an EasyHack anymore.

I need to remove that [EasyHack] tag from the title to avoid giving a false impression.
Comment 4 Kohei Yoshida 2011-08-18 08:49:38 UTC
Just to clarify, you or anyone could still work on this if you really care about this.  It's just that, getting this in would involve complexities that you may or may not be willing to deal with.  So, my personal advice would be to work on something else that's a little less tricky, then come back to this once you've gained more experience and confidence with the code base.
Comment 5 Anurag Kanungo 2013-04-20 08:57:09 UTC
I would like to work on it , as stated it ignores the precision of the import cells , basically it removes the zeros only that exist in end after the decimal, like , it will reduce 100.0000 to 100 only , but if we use 100.0234 it will remain as it is 100.0234 on import in cell . So, here we have to remove the code which removes the end zeroes . 

Can i have the path to the file , which contains the code of removing end zeroes , such as i can edit to secure precision .
Comment 6 Kohei Yoshida 2013-04-20 14:55:23 UTC
I would advise against working on this as stated in Comment 4.  This is a "Proposed" EasyHack, not a real one.  Plus I don't see a value in this feature itself, which may impact the loading performance of CSV files in general for a very marginal gain.
Comment 7 Kohei Yoshida 2013-04-20 14:56:30 UTC
Actually, let me close this, to avoid future confusion.
Comment 8 Robinson Tryon (qubit) 2015-12-15 16:58:10 UTC
Migrating Whiteboard tags to Keywords: (ProposedEasyHack -> needsDevEval, DifficultyInteresting SkillCpp)
[NinjaEdit]