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

Free Support Forum - aspose.com

InsertTable....what are the rowHeights expressed in?

I am using Slides v 17.5…

When using presentation.Slides[0].Shapes.InsertTable(…) the rowHeight array (last parameter) is expressed in what? Pixels?

Using this method, if I pass an array such as: {12,12,9}, then the table is created but the row heights are all 28.800000381469729.

If I change the above array to be: {30, 50, 30} then the results are what they should be.

Is there a minimum height?

Hi Scott,

I have observed your comments and like to share that minimal row height is dependent upon default font height for the table.When you create a table using Aspose.Slides the default row height will be ~28.8 with row cell font height of 18. I suggest you to please try using following sample code on your end whereby I have set minimal font height for table and then set minimal row height.

public static void SetMinimalRowHeight()

using (var pres = new Presentation())
ISlide sld = pres.Slides[0];
double[] dblCols = { 50, 50, 50, 50, };
double[] dblRows = { 1, 1, 1, 1, };
ITable tbl = sld.Shapes.AddTable(50, 50, dblCols, dblRows);

IPortionFormat porformat = FormatFactory.Instance.CreatePortionFormat();
porformat.FontHeight = 1;

tbl.Rows[1].MinimalHeight = 1;

Console.WriteLine("\n\nMinimalHeight = {0}; Height = {1}\n\n", tbl.Rows[1].MinimalHeight, tbl.Rows[1].Height);
pres.Save(“C:\Aspose Data\Minimalheight.pptx”, SaveFormat.Pptx);

Many Thanks,