We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Excel deleted some formats

I try to fill a column by cells with specified font and save a file by "111.xls" (attached). Then I open it in Excel 2003 and select a range of cells that contains a colored text and set a new font color. After saving as new file fnd open it in Excel, I have a message "Excel deleted some formats". Syncfusion can open this file, but when I try to operate with RichText of colored columns, this throws an Exception "Index out of range". Excel 2007 have not any problems.

Please help.



111_b911084c.zip

2 Replies

LP lapukh petrov April 20, 2010 07:39 AM UTC

Code:

ExcelEngine engine = new ExcelEngine();

IApplication app = engine.Excel;

IWorkbook wbk = app.Workbooks.Create();

IWorksheet wsh = wbk.Worksheets[0];

IFont redFnt = wbk.CreateFont();
redFnt.Color = ExcelKnownColors.Rose;

for (int i = 0; i < 123; i++)
{

wsh[i + 3, 3].RichText.BeginUpdate();

wsh[i + 3, 3].RichText.Append("TXT" + i.ToString(), redFnt);

wsh[i + 3, 3].RichText.EndUpdate();
}

wbk.SaveAs(sfd.FileName);


LR Lokesh R Syncfusion Team April 26, 2010 12:45 PM UTC

Hi Lapukh,

Thank you very much for your interest in Syncfusion products.

We are sorry for the delay caused in getting back to you.

We are afraid that we could not able to reproduce the issue at our side.We have created a sample and tested the sample with the 8.2.0.18 version assemblies.Please try the sample with the assemblies from the attachment and let us know if this helps you.

Please, revert us back if you need any clarifications.

Thanks,
Lokesh.




94055_c6aed26.zip

Loader.
Live Chat Icon For mobile
Up arrow icon