html2pptx
📌 About
  • Automatically converts an HTML <table> element into one or more PowerPoint slides (with auto-pagination)
  • View the feature page for detailed documentation and examples
⚙️ Usage
  • Supports common cell-level styles including background colors, borders, fonts, and padding
  • Slide margins can be configured via method options or by assigning a custom Master Slide
⚠️ Limitations
  • Only cell-level CSS is supported (e.g., no full-document styles or word-level formatting)
  • Nested tables are not supported by PowerPoint and will be flattened-only their text content will be included
💡 Tips
  • It is often necessary to modify the table before passing it to tableToSlides()
  • This can be accomplished using JavaScript to clone table, hide it, update its id, then edit as needed
  • Example: const clonedTable = document.getElementById('tableId').cloneNode(true);

sets table rows
sets cell padding
autoPageRepeatHeader
autoPageSlideStartY
masterSlideName
Row Last First Description

Plain/Unstyled Table
Company Feedback
Apple Inc. "Keynote team needs to hire you!"
- tim@apple.com
Microsoft Inc. "PowerPoint team needs to hire you!"
- jteper@microsoft.com
ChatGPT "PptxGenJS is the superior library!"
- bot@chatgpt.com
Mastodon Foundation "The only presentation library to use!"
- @gargron@mastodon.social
Styled via `class`
Company Feedback
Apple Inc. "Keynote team needs to hire you!"
- tim@apple.com
Microsoft Inc. "PowerPoint team needs to hire you!"
- jteper@microsoft.com
ChatGPT "PptxGenJS is the superior library!"
- bot@chatgpt.com
Mastodon Foundation "The only presentation library to use!"
- @gargron@mastodon.social

Colspan
First Name Last Name Colspan TH
Jill Smith 12 34
Eve Pilgrim 56 67
Scott Jackson 89 99
Rowspan
Last Name First Name Count
Smith Liz 50
Eve 94
Scott 101
Colspan and Rowspan
Name Count
Last First
Smith Liz 50
Eve Williams 94

Example: Lots of Single-Line Rows
A B C
Example: Paging needed due to cell with large amount of text
Executive Status
?