rameshsind / native-excel-emitter-birt-plugin

Automatically exported from code.google.com/p/native-excel-emitter-birt-plugin
0 stars 0 forks source link

color is not displaying proper for office 2007 version #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I have created cells. merged the cells 
2. Defined the label and background color to merged cell
3. Call the file using IExcelRenderOption.OFFICE_VERSION, "office2007" option

What is the expected output? What do you see instead?
The column should display with specified color, but the column is displayed in 
black color.

What version of the product are you using? On what operating system?
I am using 
"org.eclipse.birt.report.engine.emitter.nativexls_1.0.0.201110122114.jar" and 
windowsXP OS.

Please provide any additional information below.

I have merged the cell using following code:
CellHandle cell1 = (CellHandle) tableheader.getCells().get(i+7); 
                CellHandle cell2 = (CellHandle) tableheader.getCells().get(i+8); 
                CellHandle cell3 = (CellHandle) tableheader.getCells().get(i+9); 
                CellHandle cell4 = (CellHandle) tableheader.getCells().get(i+10);
                CellHandle cell5 = (CellHandle) tableheader.getCells().get(i+11); 
                CellHandle cell6 = (CellHandle) tableheader.getCells().get(i+12); 
                CellHandle cell7 = (CellHandle) tableheader.getCells().get(i+13);
                CellHandle cell8 = (CellHandle) tableheader.getCells().get(i+14);
                CellHandle cell9 = (CellHandle) tableheader.getCells().get(i+15); 
                CellHandle cell10 = (CellHandle) tableheader.getCells().get(i+16); 
                CellHandle cell11 = (CellHandle) tableheader.getCells().get(i+17);  
                cell1.drop();
                cell2.drop();
                cell3.drop();
                cell4.drop();
                cell5.drop();
                cell6.drop();
                cell7.drop();
                cell8.drop();
                cell9.drop();
                cell10.drop();
                cell11.drop();
                CellHandle cell12 = (CellHandle) tableheader.getCells( ).get(i+6);
                cell12.setColumnSpan(12);
                //cell.setProperty(CellHandle.WIDTH_PROP, "0.4");
                cell12.getContent().add(label1);  
                styleHandle = cell12.getPrivateStyle();
                styleHandle.setProperty(StyleHandle.BACKGROUND_COLOR_PROP, "BLUE");
                styleHandle.setProperty(StyleHandle.FONT_FAMILY_PROP, "Arial");
                styleHandle.setProperty(StyleHandle.FONT_SIZE_PROP, 14);

and call the excel using following code: 
EXCELRenderOption options = new EXCELRenderOption();   
            options.setOutputFormat("xls");  
            options.setOutputFileName("c:/test5.xls");  
            options.setOption( IExcelRenderOption.OFFICE_VERSION, "office2007"); 
            options.setOption(IRenderOption.EMITTER_ID,"org.eclipse.birt.report.engine.emitter.nativexls");

Original issue reported on code.google.com by adewan...@gmail.com on 10 Apr 2012 at 12:48

GoogleCodeExporter commented 8 years ago
I am having the same issue. I am using coler that i took from an plain excel 
document and when i export the report to excel color gets changed.

Original comment by skgupta3...@gmail.com on 15 Aug 2012 at 5:02

GoogleCodeExporter commented 8 years ago
you can use spudsoft excel emitter to resolve the color problem.

Original comment by adewan...@gmail.com on 17 Aug 2012 at 6:26