If you can assume that all of your columns are above a fixed width, except for the first column where product.Name used, and your font style is the same, then you can use the following method instead of checking the height table> border.
First open your presentation in PowerPoint and go to the slide with your spreadsheet. Enter the data for a fixed-width column. Then in the first column, enter "XXXX ...." until the line breaks. Count the number of characters before a line break. This number will be maxLengthBeforeBreak
Secondly, clear the line from the first step above and enter in a similar line that does not interrupt the line. Copy and paste this line down and fill the table in the slide until you get the maximum number of lines for the slide that looks attractive to the user. This number of rows will be maxTableRowsPerSlide
Now that you fill each slide with lines, count the number of lines that you insert in the rowCount variable. Insert rows until rowCount < maxTableRowsPerSlide , then start a new slide.
And for each row - if the length of product.Name is> maxLengthBeforeOverflow , you can increase rowCount by dividing the length of product.Name by maxLengthBeforeOverflow to get the number lines that this string wraps.
source share