Problem A
An issue with the Windows c# excel sheet cell font style not changing to ‘black’ color
Problem B
Highlighting import columns header in an excel sheet using c# winforms
Solution
The Microsoft.Office.Interop.Excel package allows us to access the excel to API objects.
In solution Explorer, Right click on project name and choose “Manage Nuget packages” option to Add new Microsoft.Office.Interop.Excel new package by Microsoft then click OK, if you have not installed yet.
The ClosedXML package allows us to access the excel to API objects.
In solution Explorer, Right click on project name and choose “Manage Nuget packages” option to Add new ClosedXML new package by Microsoft then click OK, if you have not installed yet.
Do copy paste the below code
Conclusion
The Microsoft.Office.Interop.Excel package allows us access excel objects and change the behaviour of the cells style. XLColor.FromTheme(XLThemeColor.Text1);
can be used set the cell text font color style as black.