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

Free Support Forum - aspose.com

Cannot get row height

Hi, is it possible to get the height of the row by using row.rowFormat.Height property?. I notice that it always return 0.00. The following is the code sample. double dblRowHeight = row.rowFormat.Height; Thanks & Regards, Ye Soe Paing.

Hi

Thanks for your request. You can determine height of a row using RowFormat.Height.

Please see the following link:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/aspose.words.tables.rowformat.height.html

Document doc = new Document("C:\\Temp\\Table.docx");

foreach (Table table in doc.GetChildNodes(NodeType.Table, true))

{

foreach (Row row in table.Rows)

{

Console.WriteLine(row.RowFormat.HeightRule);

Console.WriteLine(row.RowFormat.Height);

}

}

You got 0.00 because RowFormat.HeightRule is Auto, and there is no specific height.

Best regards,