I used the BiffViewer to look at the file, but I'm not sure how to read what
I am looking at.  I can see many different kinds of style objects and a
couple of cell objects, but am not sure how you know what cell has what
style.
Is there anywhere where there are instructions on how to read the output of
the BiffViewer?

As shown in the code, the new cellStyle was created by cloning the cellStyle
of the cell, modifying it, and setting the cellStyle of the cell to the
newly modified clone.

I don't remember what the original style of the cells were in the workbook
attached to my first method.  I am attaching a second workbook were I know
that the original cellStyle of all the cells was the default, i.e. I did not
modify the style before running the workbook through the program.

Please let me know if anyone has any ideas.

Thank again in advance for your time.

Regaurds,
yehogold

http://www.nabble.com/file/p24955769/workbook.xls workbook.xls 


MSB wrote:
> 
> As a first step, I would reccomend that you investigate alittle using the
> BiffViewer utility. That may tell you which attributes of the cell style
> are either not being set correctly or corrunpted by the clone process.
> 
> Does the example workbook you have posted contain both the corrupted cell
> style and the style that you are cloning to create it in the first
> instance?
> 
> Yours
> 
> Mark B
> 
> 
> yehogold wrote:
>> 
>> Hi.
>> 
>> I have the following code used to modify the pattern of a cell:
>> 
>>              Workbook wb = cell.getSheet().getWorkbook();
>>              CellStyle errorStyle = wb.createCellStyle();
>>      
>>              errorStyle.cloneStyleFrom(cell.getCellStyle());
>>              
>>              errorStyle.setFillForegroundColor(Font.COLOR_RED);
>>              errorStyle.setFillPattern(CellStyle.THIN_BACKWARD_DIAG);
>>              
>>              cell.setCellStyle(errorStyle);  
>> 
>> When I run it, I end up getting these weird looking black cells.  Excel
>> 2003 will also not let me directly change the format of the black cells. 
>> How would I format the cells withouth getting this problem?
>> 
>> I am inclosing one of the workbooks.  The messed up black cells are on
>> sheet2.
>> 
>> Thank you in advance for your help.
>>  http://www.nabble.com/file/p24923092/workbook2.xls workbook2.xls 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Weird-cells-appearing-after-modifying-the-format-of-a-cell-tp24923092p24955769.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to