We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PPT table shape doesn't maintain the auto height of the rows

Hi,

We are using Aspose.Slides version 7.2.0.0. We have a powerpoint file which serves as a template for generating a report. The powerpoint contains a table shape with m X n (rows X columns). When the text is entered in the cells of the m rows. Each rows takes it height as the height of cell containing maximum data. For example, if a cell contains some data which gets wrapped to 4 rows then the height of row becomes equivalent to data in 4 rows. The text in each cell acts as a placeholder, but when this text gets replaced by the actual data which contains only few characters which can be accommodated in a single row only then the expacted height of the row should be equvilaent to data of cells in the row as single line only, whereas it still occupies the height equivalent to 4 rows of data. This is happening only in this version(7.2.0.0), whereas the issue was not happening in version 5.8.0.0.

In version 5.8.0.0 the height of the row is equivalent to 1 row of data and not the actual height which is the maximum number of rows.

Please find attached the two files containing the template file as well as report generated from it. You can see that the report file containing four rows, first one is header row, second row with title(Cost of Labor) contains some data and one of the placeholder which was not replaced, third row with title(Cost of Technology) contains some data which comes as replacement of all the placeholders from Template file, but notice the height of this row which is not as expected containing some extra height because the template contained this height. We expact data to autofit and height of row as per the data only and this is the same with version 5.8.0.0.

Can you look into this and suggest a workaround or solution for the same.

Thanks,
Manish




Hi Manish,


I have observed the issues shared by you and would first recommend you to please try using Aspose.Slides for .NET 7.4.0 on your end. Secondly, you may try to set the following property for every text frame of each cell in the target row. I am hopeful that it will work. If there is still an issue then please share the sample application highlighting the issue and I will try my best to help you further.

TextFrameEx.AutofitType=TextAutofitTypeEx.Shape;


Many Thanks,