Hi

thanks for the answer.

I tried this. It works fine when the style has been put explicitely on a cell.
But when the style is defined in Excel on a whole column / row, then the cell does not really exist in the HSSF workbook. I have to create it before using it. And when I create a blank cell, it comes with a default style that is not the one applied on the whole column / row.


My problem is that I don't want to loose that style and I don't kow how to retrieve it.

Do you have an idea ?

thanks

thibaut



[EMAIL PROTECTED] a Ãcrit :

HSSFCellStyle cellStyle = cell.getCellStyle();

best regards

                   _____ __
 ____ _____  ____ / ___// /_  ____ _________
/ __ `/ __ \/ __ \\__ \/ __ \/ __ `/ ___/ _ \
/ /_/ / /_/ / /_/ /__/ / / / / /_/ / /  /  __/
\__,_/ .___/ .___/____/_/ /_/\__,_/_/   \___/
   /_/   /_/             all byte - no bark
   ---------------------------------------------




Thibaut Nicolas wrote:

Hi,

Has somebody ever met this problem ? Can someone tell me how can I get existing row and column styles ? I didn't find it in HSSF api :-(

thanks in advance,

thibaut



Thibaut Nicolas a Ãcrit :

Hi all,

I'm having trouble using POI to modify an existing XLS file.
I create an XLS file as follow :
  - column C is formatted to use bold font
  - row 2 is formatted to have a yellow background color.
Then I use POI to insert values in this template.

When reading the sheet, I can only retrieve the cell C2 and I can easily insert the value inside without loosing the cell formatting.
But I can't find any other cell. Anyway I can create the other cells I want to put data inside.
Then I don't know where to find the stored style properties so that all cells added in column C are in bold and all cells added in row 2 are yellow.


Thanks in advance for any help

Thibaut

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to