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.

Wed Sep 05, 2018 7:32 am

I provide cell color with RGB value (87,37,125) from c# and it results RGB value to (102,0,102). Kindly provide me with the sample or solution so that i can get my desired RGB to (87,37,125)

aksh0614
 
Posts: 23
Joined: Mon Jul 02, 2018 3:53 am

Wed Sep 05, 2018 8:26 am

Hello,

Thanks for your post.
Please set version of workbook to version2007 or above version, and below is the sample code for your reference. If there is any question, welcome to write back.
Code: Select all
Workbook workbook = new Workbook();
//Set version to Version2007 or above Version
workbook.Version = ExcelVersion.Version2007;
Worksheet sheet = workbook.Worksheets[0];
CellRange cell = sheet.Range["A1"];
cell.Style.Color = (Color.FromArgb(87, 37, 125));
workbook.SaveToFile("result.xlsx",ExcelVersion.Version2007);

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Thu Sep 06, 2018 7:26 am

thank you it will work properly now

aksh0614
 
Posts: 23
Joined: Mon Jul 02, 2018 3:53 am

Thu Sep 06, 2018 7:55 am

Hello,

Thanks for your quick response.
If you encounter any issue related to our products in the future, just feel free to contact us.
Wish you all the best!

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.XLS