EasyXLS

Themes

EasyXLS™ library allows you to set a theme for the workbook.

The look and feel of an Excel file can be changed by applying a theme. A theme includes color, font and effect settings.

EasyXLS provides methods for setting a theme to the workbook. A predefined built-in theme or a customized theme can be set.

This feature is available only for Office 2007 or later documents (xlsx, xlsm and xlsb files).

EasyXLS provides the following classes for storing the theme settings: ExcelTheme, ExcelColorScheme, ExcelFontScheme and ExcelEffectScheme.

The color scheme contains the color palette for text/background, accents of colors and hyperlink color. The font scheme contains the heading and body font. The effect scheme includes special effects that cannot be customized and are limited to predefined effects settings.

Predefined theme

The below source code sample shows how to set a predefined theme for the workbook.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

Custom theme

The below source code sample shows how to apply a custom theme to the workbook, a theme with specific colors, fonts and effects defined.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

Theme color

A theme color can be used by various EasyXLS classes to set the color for different elements of Excel workbook like cell background, cell foreground, border color and others. The ThemeColor class stores only the index of the color in color palette that is defined in ExcelColorScheme class. The color scheme is based on a set of 12 colors. There are 10 basic colors that are altered darker or lighter and two colors for hyperlinks. So, the color palette is a matrix of colors with 10 basic colors as headings.

The below source code sample shows how to set a theme color as background on a cell.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python
 

Available for: Professional, Excel Writer, Excel Reader
Go to top

EasyXLS Excel libraries:

.NET
.NET Excel Library
full .NET version to import, export or convert Excel files
COM+ Excel Library
full COM+ version to import, export or convert Excel files
-
Java
Java Excel Library
full Java version to import, export or convert Excel files
Download EasyXLS™ Excel Library for .NET and Java

File formats:

Office 365
MS Excel 2021 - 2024
MS Excel 2007 - 2019
MS Excel 97 - 2003
XLSXXLSMXLSBXLS
XMLHTMLCSVTXT