https://issues.apache.org/bugzilla/show_bug.cgi?id=56377
Bug ID: 56377
Summary: Autosize columns with custom date format (yyyy-MM-dd
HH:mm:ss GMT) gets wrong width
Product: POI
Version: 3.10
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Created attachment 31498
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31498&action=edit
Snippet
* Quick overview:
When you try to add a date into a cell, and you use a date with customized
format.
For instance:
"yyyy-MM-dd HH:mm:ss \"GMT\"" (this adds always a fixed timezone value to the
date)
It means that you want to keep the cell as a date cell (no string cell), but
only display in it the extra "GMT". When you want to autosize this column, the
output width is shorter than the content, and then '#' characters are
displayed. (see the attached xls file)
* How to reproduce the issue:
To reproduce it just execute the "generate()" method of the attached code
snippet, and create the xls file with the byte array returned value.
* Note: I reproduced the issue with org.apache.poi.xssf.usermodel.XSSFSheet and
org.apache.poi.ss.usermodel.Sheet
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]