Spire.XLS for .NET is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application, both ASP.NET web sites and Windows Forms application.

Mon Mar 05, 2012 8:05 am

Hello,

I had changed some values of cells as follows:
sheet.Range[range].NumberValue = value;

And then, I saved the modifed excel file using 'workbook.SaveToFile(path, ExcelVersion.Version97to2003); '.
Everything is fine but the colors of cells (styles) are chaged.

What should I do to stop the unexpected color changing?

Thank you.

minyoung
 
Posts: 1
Joined: Wed Feb 29, 2012 2:45 am

Tue Mar 06, 2012 1:14 am

Hello minyoung,

So sorry for the late reply and thanks for your inquiry.

The issue you met might because you created the excel with excel2007or10, but you save it as excel97To2003 in project. Some features(format,color etc) in excel2007or10 can't be supported by excel97To2003. So you found that colors of cells (styles) are changed. You can stop the unexpected color changing with having same excel version to generate and open file.

If you still have any questions,please feel free to contact us.
Have a great day.

BR
Suvi
e-iceblue support
User avatar

Suvi.Wu
 
Posts: 154
Joined: Thu Oct 20, 2011 2:53 am

Return to Spire.XLS