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 2015/07/05 16:35:03 UTC

[Bug 58102] New: read excel double value have problem

https://bz.apache.org/bugzilla/show_bug.cgi?id=58102

            Bug ID: 58102
           Summary: read excel double value have problem
           Product: POI
           Version: 3.12-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: 465406325@163.com

hello, I`AM use poi 3.12 read excel have two problem:
(1)  excel Numerical value for text storage poi read cell type become
Cell.CELL_TYPE_NUMERIC. e.g: excel value : "234234342" poi read value become
234234342.0
(2)  excel double value poi read value have Many decimal places.  e.g: excel
value  12.008 poi read become 12.0079999999999

I hope POI cell.getNumericCellValue() does not use Double, but BigDecimal.
I set up the cell to the text type in EXCEL, because the cell.getCellType POI
() can get the corresponding Cell.CELL_TYPE_STRING

-- 
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 58102] read excel double value have problem

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58102

yangcy <46...@163.com> 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 58102] read excel double value have problem

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58102

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
This is all exactly as expected. Excel uses floating point numbers to store and
represent numeric values

To get a string that looks like what Excel displays for a cell, you need to use
DataFormatter

-- 
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