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.

Thu Nov 03, 2022 12:44 pm

I can't read the value of theme color #000000 when using range.Style.Color.Name
Attachments
Snipaste_2022-11-03_20-40-51.png
Snipaste_2022-11-03_20-40-51.png (15.43 KiB) Viewed 1882 times
Snipaste_2022-11-03_20-37-30.png
Snipaste_2022-11-03_20-37-30.png (21.43 KiB) Viewed 1882 times
Snipaste_2022-11-03_20-36-38.png
Snipaste_2022-11-03_20-36-38.png (2.5 KiB) Viewed 1882 times

qujiajiang
 
Posts: 1
Joined: Thu Nov 03, 2022 12:29 pm

Fri Nov 04, 2022 6:27 am

Hello,

Thanks for your inquiry.
After investigation, I reproduced your issue and logged it into our bug tracking system with the ticket number SPIREXLS-4253. Our development team will investigate and fix it. Once it is resolved, I will inform you in time. Sorry for the inconvenience caused.

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 860
Joined: Tue Mar 08, 2022 2:02 am

Fri Nov 04, 2022 6:49 am

Hello,

After investigation, I guess that you set the fill color for the cell instead of the background color, therefore, you need to use the following code to get the fill color.
Code: Select all
string colorName = range.Style.PatternColor.Name;

If this code doesn't meet your requirement, to help us reproduce your issue and work out a solution for you, please offer the following message.
1) Your excel file.
2) Application type, such as Console App, .NET Framework 4.8.
3)Your test environment, such as OS info (E.g. Windows 7, 64-bit) and region setting (E.g. China, Chinese).

Sincerely
Abel
E-iceblue support team
User avatar

Abel.He
 
Posts: 860
Joined: Tue Mar 08, 2022 2:02 am

Return to Spire.XLS