You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Jason Howe <Ja...@LHSC.ON.CA> on 2011/09/29 20:38:10 UTC

POI: Conditional Formatting

Hello,

I am having trouble with the conditional formatting on an Excel sheet being manipulated using POI (HSSF).   This is an existing Excel worksheet that I am adding data to one sheet (Data) which is referenced in another (Summary).  The "Summary" sheet then uses a combo box to populate from a specific row in the "Data" sheet based on the date selected.  Depending on the values here there is some conditional formatting to style the cells background color (this conditional formatting is pre existing and is not manipulated with POI).  I am finding that the formatting is not taking place.  If I go into the Excel spreadsheet and manually re-enter the values and hit enter the formatting is then updated (or changing the combo box manually the formatting will update).  Is there some way to trigger all conditional formatting to "reprocess" in Apache POI before writing the file?

Thanks,
   Jason

 --------------------------------------------------------------------------------
This information is directed in confidence solely to the person named above and may contain confidential and/or privileged material. This information may not otherwise be distributed, copied or disclosed. If you have received this e-mail in error, please notify the sender immediately via a return e-mail and destroy original message. Thank you for your cooperation.

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


Re: POI: Conditional Formatting

Posted by Yegor Kozlov <ye...@dinom.ru>.
It is hard to tell what is wrong without a sample file. It might be a
flag in the Excel binary format that trigger recalculation of
conditional formatting on workbook or worksheet level that POI does
not set.

Can you create a bug in bugzilla and attache the following data:

1. The template .xls file with the "Data" and "Summary" sheets.
2. The file processed by POI with CF not properly updated.
3. Java code that does (2)
4. .xls file with data manually entered in Excel and CF updated.

Given this information we can compare POI's output with Excel and see
what is wrong.

Yegor

On Thu, Sep 29, 2011 at 10:38 PM, Jason Howe <Ja...@lhsc.on.ca> wrote:
> Hello,
>
> I am having trouble with the conditional formatting on an Excel sheet being manipulated using POI (HSSF).   This is an existing Excel worksheet that I am adding data to one sheet (Data) which is referenced in another (Summary).  The "Summary" sheet then uses a combo box to populate from a specific row in the "Data" sheet based on the date selected.  Depending on the values here there is some conditional formatting to style the cells background color (this conditional formatting is pre existing and is not manipulated with POI).  I am finding that the formatting is not taking place.  If I go into the Excel spreadsheet and manually re-enter the values and hit enter the formatting is then updated (or changing the combo box manually the formatting will update).  Is there some way to trigger all conditional formatting to "reprocess" in Apache POI before writing the file?
>
> Thanks,
>   Jason
>
>  --------------------------------------------------------------------------------
> This information is directed in confidence solely to the person named above and may contain confidential and/or privileged material. This information may not otherwise be distributed, copied or disclosed. If you have received this e-mail in error, please notify the sender immediately via a return e-mail and destroy original message. Thank you for your cooperation.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

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