Bug 38880

Summary: Precision in CSV import
Product: LibreOffice Reporter: Björn Michaelsen <bjoern.michaelsen>
Component: SpreadsheetAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium CC: libreoffice, vuhung16plus
Version: unspecified   
Hardware: Other   
OS: All   
See Also: http://qa.openoffice.org/issues/show_bug.cgi?id=110412
Whiteboard: ProposedEasyHack DifficultyInteresting SkillCpp
i915 platform: i915 features:

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 (inactive) 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 (inactive) 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 (inactive) 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 (inactive) 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 (inactive) 2013-04-20 14:56:30 UTC
Actually, let me close this, to avoid future confusion.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.