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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Excel deleted some formats

Thread ID:

Created:

Updated:

Platform:

Replies:

94055 Apr 20,2010 07:35 AM UTC Apr 26,2010 12:45 PM UTC WinForms 2
loading
Tags: XlsIO
lapukh petrov
Asked On April 20, 2010 07:35 AM UTC

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

lapukh petrov
Replied On 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);

Lokesh R [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;