Skip to content

Using Themes

Mats Alm edited this page Nov 27, 2023 · 10 revisions

EPPlus 5/6 support creating and loading themes - this is done via the Workbook.ThemeManager. A theme can be exported from Excel using the thmx format and then loaded via EPPLus:

var thmxFile = new FileInfo("c:\\temp\\integral.thmx");
package.Workbook.ThemeManager.Load(thmxFile);

The theme can then be altered via the ThemeManager.CurrentTheme property

//Change the color of the Accent1 theme color.
package.Workbook.ThemeManager.CurrentTheme.ColorScheme.Accent1.SetRgbColor(Color.FromArgb(32, 78, 224));

See also

EPPlus wiki

Versions

Worksheet & Ranges

Styling

Import/Export data

Formulas and filters

Charts & Drawing objects

Tables & Pivot Tables

VBA & Protection

Clone this wiki locally