poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56377] New: Autosize columns with custom date format (yyyy-MM-dd HH:mm:ss GMT) gets wrong width
Date Wed, 09 Apr 2014 14:15:39 GMT
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: dev@poi.apache.org
          Reporter: spuyo84@gmail.com

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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message