Setting the background color to 65 works for me.

-----Original Message-----
From: Dominik Stadler [mailto:[email protected]] 
Sent: Friday, September 18, 2015 4:18 PM
To: POI Users List
Subject: RE: Cannot see text in cell after F2

Hi,

there is a similar bug related to background fill color at
https://bz.apache.org/bugzilla/show_bug.cgi?id=56548

A workaround might be to set the background fill color of the cell style to
65 in this case, let us know if it works for you so we can note it in the bug 
report.

Dominik
Am 18.09.2015 18:25 schrieb "Murphy, Mark" <[email protected]>:

> One other observation, because I don't have time to look further into 
> the code right now, that third fill which provides a blue cell 
> background is the only one I created, and I only added a foreground 
> color to it. So somewhere, something is just adding <bgColor 
> indexed="64" /> to fills whether it is called for or not. For a solid 
> fill, there is no problem with that, but for other fills, it apparently will 
> cause some problems.
>
> -----Original Message-----
> From: Murphy, Mark [mailto:[email protected]]
> Sent: Friday, September 18, 2015 11:56 AM
> To: [email protected]
> Subject: Cannot see text in cell after F2
>
> POI 3.12 - XSSF workbook
>
> I am having trouble with spreadsheets created by POI. When I open them 
> in Excel, they look just fine, but when I try to edit the contents of 
> a cell, I cannot see the value of the cell, it all turns black. I 
> think it might be something having to do with the my style, as only 
> cells that I have created, and therefore added a style to have this 
> issue. Let me be more specific.
>
> On my spreadsheet, if I select a cell with data in it and press F2, 
> the cell turns black. If I drag the mouse through the cell, it all turns 
> white.
> I tried this on a cell where the text is not black, but red. In this 
> case when I press F2, I can see the red text against the black 
> background of the cell, and if I drag the mouse through the cell, the 
> text turns light blue on a white background. Somewhere the "edit" 
> background color is being set to black, but I don't know how I am doing this.
>
> Unfortunately I am not having this trouble for all of my cells. And to 
> make matters more difficult, I am using a particular style with two 
> different cells, and one exhibits the behavior, and the other does 
> not. The only difference between these two cells is that I am drawing 
> borders around one, and not around the other. Yet not all of the cells 
> I am drawing a border around have the problem either.
>
> Anyway, I still believe it has something to do with the style, and how 
> it is being selected or created. Dozens of styles are created behind 
> the scenes, exacerbated by the drawing of cell borders, and that could 
> be my problem. But, I found in styles.xml, a fill that I did not 
> expect. Here is the bad fill:
>
>        <fills count="4">
>               <fill>
>                      <patternFill patternType="none" />
>               </fill>
>               <fill>
>                      <patternFill patternType="gray125" />
>               </fill>
>               <fill>
>                      <patternFill patternType="solid">
>                            <fgColor indexed="44" />
>                            <bgColor indexed="64" />
>                      </patternFill>
>               </fill>
>               <fill>
>                      <patternFill patternType="none">
>                            <bgColor indexed="64" />
>                      </patternFill>
>               </fill>
>        </fills>
>
> Every style that used that last fill had the issue, I validated this 
> by removing the bgColor node from that last fill, and now the 
> spreadsheet is working as expected. Still not real sure where it came 
> from though. Maybe the use of the border drawing utility, though I 
> have other cells with borders from that utility that do not use the 
> faulty fill. Maybe because they already had an explicit fill assigned to them.
>
> Any idea what I can do to solve this?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected] For additional 
> commands, e-mail: [email protected]
>
>

Reply via email to