You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Paul Lee <pa...@skinnypigeon.com> on 2004/02/17 21:47:58 UTC

General questions about HSSFDataFormat

Hi all, I am still new at POI, so please forgive me if my questions sound obvious.

I am writing a class to extract all style information from a spreadsheet.  My
steps are as follows:

(1) use HSSFWorkbook.getNumCellStyles() to get total # of styles
(2) cycle through each style.  For each style, I get the alignment, borders etc.

My problems came when I am extracting the DataFormat using
HSSFCellStyle.getDataFormat().  My specific questions are:

- there are only 40 or so predefined style formats in HSSFDataFormat
(http://jakarta.apache.org/poi/apidocs/org/apache/poi/hssf/usermodel/HSSFDataFormat.html).
 With the endless combination of Excel format mask (e.g. I want Negative Red
Parenteses, 4 decimal with Euro sign), it is impossible to predefine style
format.  Is there a way to just get the format mask string back, or am I
missing something?

- if I just create a blank spreadsheet using Excel 2002, my little loop
program already picked up four undefined HSSFDataFormat indexes (43, 41, 44,
42).  Just curious as to what those are.

I (think) have made an honest effort to dig up more info but came to a dead
end.  Any pointers would be greatly appreciated.

Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org