You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2016/01/03 00:09:46 UTC

[Bug 58788] New: Colors are lost in headers in worksheets moving from left to right

https://bz.apache.org/bugzilla/show_bug.cgi?id=58788

            Bug ID: 58788
           Summary: Colors are lost in headers in worksheets moving from
                    left to right
           Product: POI
           Version: 3.13-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
          Assignee: dev@poi.apache.org
          Reporter: jim_showalter@intuit.com

Created attachment 33394
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33394&action=edit
Program to reproduce this bug. See instructions for reproducing.

The same code used for all worksheets produces different results. The first few
worksheets look fine but gradually colors drop off until there are no colors at
all.

To reproduce:

Run the attached program with one command-line arg for the output file name.

In the generated file, click from left to right on the worksheets.

The first two worksheets look fine.

The third worksheet has only one row set to blue, and no row set to yellow.

The remaining worksheets have no color.

Change NUM_COLUMNS from 7 to 3 in the code.

Compile and run again.

Click from left to right on the worksheets.

The first four worksheets look fine.

The fifth worksheet only has yellow on the first column.

The sixth worksheet has no color.

Using poi version 3.13.

Same behavior with 3.12.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 58788] Colors are lost in headers in worksheets moving from left to right

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58788

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 58788] Colors are lost in headers in worksheets moving from left to right

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58788

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Styles are per Workbook and should be reused across cells, does it work when
you just use two global  styles across the workbook?

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 58788] Colors are lost in headers in worksheets moving from left to right

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58788

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WORKSFORME
             Status|NEEDINFO                    |RESOLVED

--- Comment #4 from Dominik Stadler <do...@gmx.at> ---
Glad that it helped, I quickly tried it locally on Linux, LibreOffice shows the
colors in the resulting file correctly, so it seems to be some strange
behaviour with Excel. Anyway I don't see anything that we can fix here so I am
closing this for now.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 58788] Colors are lost in headers in worksheets moving from left to right

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58788

--- Comment #2 from Jim Showalter <ji...@intuit.com> ---
That was it. My mistake. Thank you!

When creating styles for each cell, they're separate objects, so it's odd that
they don't wind up with the same effect on each worksheet (is that a bug?).

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 58788] Colors are lost in headers in worksheets moving from left to right

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58788

--- Comment #3 from Jim Showalter <ji...@intuit.com> ---
That fixed it. Any idea why repeatedly creating cell styles would cause them to
stop applying colors as defined? Also, when defining styles to be used
globally, the API supports defining a user string for the style, but there's no
way to look up a style by string, so the styles have to be passed as additional
parameters, or assigned to globals. It would be nice to be able to look up by
name.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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