Feature Request: Support custom table styles
See original GitHub issueCurrently, the user can only specify a built-in style name when creating a worksheet table via the style
option when calling add_table()
and xlsxwriter always writes an empty tag to the tableStyles
element. The Workbook
class will need a new method for add_table_style()
and the Styles
class _write_table_styles()
method will need to support writing the appropriate tags. I’ll submit a PR for this shortly.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Table Styles in Success Snapshot - Gainsight Inc.
This article explains how admins can create, customize, and apply table styles to Tabular Reports in the Success Snapshot template.
Read more >What to do custom table style - Document360
Table style is an important element in Document360 or for any possible avenue for creating a rich design layout for a document.
Read more >Styling tables - Learn web development | MDN
This article provides a guide to making HTML tables look good, with some specific table styling techniques highlighted.
Read more >Three Tips to Using Table Styles in MadCap Flare
1. Apply Styles to Multiple Topics at Once · 2. Create a “Custom” Type for Rows and Columns · 3. Include Header Rows...
Read more >CKEditor 5 v17.0.0 with table styles and special characters
0.0 that introduces two major and frequently requested features: table styling support and the special characters plugin. In addition to that, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure. When you call
worksheet.add_table()
, you can specify a style name in the options (http://xlsxwriter.readthedocs.io/working_with_tables.html), e.g.sheet.add_table('B3:F7', {'style': 'Table Style Light 11'})
. This style name has to be a built-in style, you can’t create your own so you’re limited to the color/format choices that Excel gives you (21 light, 28 medium, and 11 dark themes).It would be nice to be able to specify the format for a new table style, which we create through xlsxwriter, and then specify by name when calling
worksheet.add_table()
.Adding this functionality involves minimal changes to
Packager._write_styles_file()
, a few small changes toStyles._write_table_styles()
and the addition ofWorkbook.add_table_style()
as a public method (plus documentation and tests).Closing as I am unlikely to tackle this.