I recently started working with openxml in C#. I have a powerpoint template which contains a table header, and the rows for this table are dynamically created and added in the C# openxml code. The issue I am facing with this is that I do not have a good way to identify what the current height of the table is at any point after adding a few rows. The way I am dealing with this is by calculating the text height (based on the font and if the text wraps in the column) and approximately figuring out the height each time a new row is added and having a table height limit (which is again estimated through trial and error) which I compare against. This technique does not really work well because I find that in some scenarios the table ends exactly at the point I intend it to and in other cases it overflows past the end of the slide or ends up covering the footer on the slide.
I also tried using the "ExtentY" and "OffsetY" attributes on the table but that doesnt seem to change as I add rows to the table. I was wondering if there is a better and cleaner way to go about this issue since what I doing seems pretty messy and hacky. Any inputs will be appreciated! Thanks!
please check below link that helps for your requirement.