Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

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