Can't set bold font

Apr 2, 2012 at 9:34 PM

I am setting the font style like this:

WorksheetWriter writer = new WorksheetWriter(spreadSheet, worksheetPart);
SpreadsheetStyle style = SpreadsheetReader.GetDefaultStyle(spreadSheet);
style.IsBold = true;
writer.PasteText("A1", "mytext", style);

After the file is saved and then opened using Excel, the following error is displayed:

"Excel found unreadable content..."

and after clicking yes to repair, the following is displayed:

"Repaired Records: Cell information from /xl/worksheets/sheet1.xml part"

The data is inserted properly but the font style is not bold.

Any suggestions?