This project has moved. For the latest updates, please go here.

Table Styles

Jul 11, 2011 at 12:01 PM
Edited Jul 11, 2011 at 12:03 PM

In Excel, a table can have a style with alternating colors for the rows and a color for the header.  Is this possible with ClosedXML without specifying the color for each row?  Also I noticed a var call showrowstripes and set it to true, but did not know any difference.  Is there something else that needs to be done?

Jul 11, 2011 at 1:20 PM

Just pick the theme you want. e.g.:

table.Theme = XLTableTheme.TableStyleMedium2;

Jul 11, 2011 at 1:21 PM

btw, the row/column stripes tells Excel to put a thin line between rows/columns.

Aug 7, 2013 at 6:46 PM
There needs to be a none item in the enum. ActiveSheet.ListObjects("Table2").TableStyle = "" Is what is recorded when I record a macro.
Aug 8, 2013 at 1:42 AM
I didn't even know that was an option. Pick up the latest check-in.
Aug 8, 2013 at 3:18 AM