Pptxgenjs: Feature Request: 'addTable()' should have an 'addHeaderToEach' option

Created on 6 Jan 2018  路  15Comments  路  Source: gitbrent/PptxGenJS

I did this slide.addTable(rows, addHeaderToEach: true);
But it didn't work. I have checked the API documents, this API is not documented.
Able to advise?

enhancement-table

Most helpful comment

@jsvishal - did you specify to repeat 2 rows using: autoPageHeaderRows:2 ?

All 15 comments

Hi @okaiyong,

The addTable() method does not utilize that option.

Only the addSlidesForTable() method uses this option when creating auto-paginated slides.

Check out the demo (examples/pptxgenjs-demo.html) for a working example.

screen shot 2018-01-08 at 22 16 38

Is there an option for addslidestoTable() to ensure that when there is a page break, each row show up on each page in complete manner, instead of half of it in one slide, another in another page.

I think it will be good to allow passing in a html5 table in addSlidesToTable() so we do not need to construct the table and yet set display to none. This could save some performance i think.

That's a good suggestion.

I've marked it as a feature request and will work on it after 2.0 releases.

[Closing due to age]

So we won't be having this option in near future ??

Thanks @okaiyong

This feature now available in the master branch and will be released with v.3.3.0

Thanks @gitbrent You are a genius

Demos added as well.

This does not seem working with colspan/rowspan in header
image
image

@jsvishal - did you specify to repeat 2 rows using: autoPageHeaderRows:2 ?

Thank. It works. Is there any way to copy Table Heading[Produc level Performace in our case] in slides?

Also table height does not seem working in extra slide added (newSlideStartY) is added with default height i guess

@jsvishal - create a master page with that heading, use it in addSlide() and it'll repeat across new slides. Table height is ignored during auto-paging - use slide margins to constrain the table. There are examples under /demos/browser

@gitbrent so in that case we have to create n master slides (if there are n different heading). I tried with placeholder text in master slide. That too was not copying itself

@jsvishal yes, for now I dont have a better solution. the work-around I use myself for my apps, is to create a master {} object and clone it, just changing the one bit of text i need.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alperendurmus picture alperendurmus  路  3Comments

Alexiz-Padilla picture Alexiz-Padilla  路  5Comments

sangramjagtap picture sangramjagtap  路  6Comments

bestis picture bestis  路  6Comments

colmben picture colmben  路  6Comments