This article explains how to set background color for entire worksheet in XlsIO using C#/VB.NET.
How to set background color for entire worksheet?
To set background color for entire worksheet, we need to create a style in workbook and apply it to the entire worksheet.
The following methods in XlsIO is used to set default styles for row or column in a worksheet.
Note: When applying the styles for the entire worksheet, it is preferable to use SetDefaultColumnStyle(int iStartColumnIndex, int iEndColumnIndex, IStyle defaultStyle). Because the SetDefaultRowStyle(int iStartRowIndex, int iEndRowIndex, IStyle defaultStyle) will cause performance issue as the number of rows in higher than the number columns.
Steps to set color for the entire worksheet
The following C#/VB.NET complete code snippet shows how to set color for entire worksheet in XlsIO.
The following screenshot shows the output generated by XlsIO after applying color for entire worksheet.
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|
or the page will be automatically redirected to sign-in page in 10 seconds.