I believe it can be mapped to a BlankRecord because the cell itself
still contains cell formatting.
 

-----Original Message-----
From: Haggerty, Michael [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 27, 2007 10:28 AM
To: poi-user@jakarta.apache.org
Subject: how to find style in existing workbook for cell position with
no cell

When a cell position (some row/column position such as 0,0) in an
existing workbook contains a cell, then its style can be found with
HSSFCell.getCellStyle().  When a cell position does not contain a cell
(HSSFRow.getCell() returns null), how can I find the style that would be
applied by Excel when a value is set into that cell position?

For example, a column can be formatted to have a specified fill color.
When working in Excel manually, a value typed into a cell in that column
will retain that fill color.  I want to use HSSF to find that column's
style, create a new style based on it, and make some changes to it.  I
cannot simply create a new style, because the default style does not
represent the column formatting, and the fill color is lost.

This question was asked by [EMAIL PROTECTED] on 22 Feb 2006 in this
mailing list, with the subject of "[Q] Excel -> HSFFCell, loosing style"
but no response was made.

Possible lead:  Will the org.apache.poi.hssf.record.BlankRecord class
help in this case?  An extended format record can be retrieved from
this, but how can a cell position be mapped to a BlankRecord?

Thank you.

--Michael



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to