You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2018/03/24 09:20:17 UTC
[Bug 62217] New: While reading a cell from Spreadsheet the precision
is changed from 10 to 6 digits after decimal in 3.17
https://bz.apache.org/bugzilla/show_bug.cgi?id=62217
Bug ID: 62217
Summary: While reading a cell from Spreadsheet the precision is
changed from 10 to 6 digits after decimal in 3.17
Product: POI
Version: 3.17-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: POI Overall
Assignee: dev@poi.apache.org
Reporter: mayur.anchalia@gmail.com
Target Milestone: ---
While reading a cell from Spreadsheet the precision is changed from 10 to 6
digits after decimal in 3.17 version
org.apache.poi.ss.usermodel.DataFormatter dataFormatter = new DataFormatter();
String content = dataFormatter .formatCellValue(Cell);
Value in the spreadsheet is 1290.219821387213
Earlier version 3.12 value returned is 1290.2198213872 but the precision is
reduced to 6 digits after decimal in latest version to 1290.219821
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62217] While reading a cell from Spreadsheet the precision is
changed from 10 to 6 digits after decimal in 3.17
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62217
pn <na...@yahoo.co.in> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nayakpiyushkumar@yahoo.co.i
| |n
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62217] While reading a cell from Spreadsheet the precision is
changed from 10 to 6 digits after decimal in 3.17
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62217
PJ Fanning <fa...@yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|NEW |RESOLVED
--- Comment #2 from PJ Fanning <fa...@yahoo.com> ---
The DataFormatter is configurable. Excel stores numbers in floating point
format so you need to format the numbers to get a value that matches
expectation.
We will not revert to the behaviour in 3.12, a release from 5 years ago. Most
users are used to the current behaviour.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62217] While reading a cell from Spreadsheet the precision is
changed from 10 to 6 digits after decimal in 3.17
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62217
Andreas Beeker <ki...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|POI Overall |SS Common
Hardware|PC |All
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62217] While reading a cell from Spreadsheet the precision is
changed from 10 to 6 digits after decimal in 3.17
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62217
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62217] While reading a cell from Spreadsheet the precision is
changed from 10 to 6 digits after decimal in 3.17
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62217
pn <na...@yahoo.co.in> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |regression
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 62217] While reading a cell from Spreadsheet the precision is
changed from 10 to 6 digits after decimal in 3.17
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62217
chenlin <74...@qq.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |FAQ
--- Comment #1 from chenlin <74...@qq.com> ---
The getformat() method of the DataFormatter of the 3.12 version directly
obtains the Format class.
The getformat() function in the dataFormatter of the 3.17 version is changed,
and a new ExcelGeneralNumberFormat class is returned.
The implementation in dataFormatter.formatCellValue() is implemented by the
getformat() method in the ExcelGeneralNumberFormat class.
The TO_10_SF constant is used to limit the data length. This restriction does
not exist in the 3.12 version. It can be considered as a version difference.
This is the code segment where you feel the precision is faulty:
private static final MathContext TO_10_SF = new MathContext(10,
RoundingMode.HALF_UP);
final double rounded = new BigDecimal(value).round(TO_10_SF).doubleValue();
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org