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 2016/03/22 23:03:30 UTC
[Bug 59216] New: Number cell value appends ".0" - issue with
hyperlink
https://bz.apache.org/bugzilla/show_bug.cgi?id=59216
Bug ID: 59216
Summary: Number cell value appends ".0" - issue with hyperlink
Product: POI
Version: 3.14-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: dev@poi.apache.org
Reporter: terencem@smartsheet.com
Created attachment 33694
--> https://bz.apache.org/bugzilla/attachment.cgi?id=33694&action=edit
XLSX containing numbers used as text
When importing a number, it's value is listed with a decimal, ".0", on the end.
This is not an issue when it is just a number as the decimal is stripped or
ignored, but if it's meant to be text, it becomes an issue. Example file
attached.
This is noticed when importing a working using:
Workbook workbook = new XSSFWorkbook(inputStream);
Where inputStream is a ByteArrayInputStream of the file.
It appears that the XML is correctly formatted:
<row r="2" spans="1:1" x14ac:dyDescent="0.25">
<c r="A2" s="1">
<v>22103</v>
</c>
</row>
However the value is not:
workbook.getSheetAt(0).getRow(1).getCell(0).getNumericCellValue() = "22103.0"
--
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 59216] Number cell value appends ".0" - issue with hyperlink
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59216
Nick Burch <ap...@gagravarr.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
OS| |All
--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
getNumericCellValue returns a double, which will include a decimal point as per
the Java Langauge spec
If you want a string of what your cell looks like in Excel, try 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