This project has moved and is read-only. For the latest updates, please go here.

Table Styles

Jul 11, 2011 at 1:01 PM
Edited Jul 11, 2011 at 1: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 2:20 PM

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

table.Theme = XLTableTheme.TableStyleMedium2;

Jul 11, 2011 at 2:21 PM

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

Aug 7, 2013 at 7: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 2:42 AM
I didn't even know that was an option. Pick up the latest check-in.
Aug 8, 2013 at 4:18 AM