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

Free Support Forum - aspose.com

Stuck while creating dynamic table


I’m creating a table with dynamic number of rows and columns. I’m facing issue with left indent of the table. I’m indenting my table by half an inch on the left side and because of this it goes out of the page margins on the right side. Is there a way to set the width of the table in such a way that all the columns in the table have equal width and I can set the width of the table?



Thanks for your request. I think in this case you can try using the following code:

// Open document

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

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





FitTableToPageWidth class you can find here:


Best regards,

The issues you have found earlier (filed as WORDSNET-352) have been fixed in this .NET update and in this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.


I’m not really sure how to use this new API, there are options to fit the table to the page but what I want is to have left indent of half inch and then the table should start and take up the rest of the space available. If you guys can provide a sample that would be great.



Thanks for your request. I think, in your case it would be enough simply specify left indent of your table. Please see Left indent property:


After specifying the left indent, you should fit the table to window.


Hope this helps.

Best regards,