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

Free Support Forum - aspose.com

Support for Positioning Floating Tables


It seems that Aspose Words provides some support for floating (or “in-line”) tables via the “Table.setTextWrapping(TextWrapping.AROUND)” API. However, based on the following posts, it seems that there are currently no APIs for the positioning properties of the floating table:

  1. https://docs.aspose.com/words/net/features/
    Which states “there is currently no API to access or modify the floating position of a table”
  2. https://forum.aspose.com/t/58911
    Note that the TextBox workaround provided here is not ideal.

Are there any plans on supporting the positioning properties of a floating table?

Hi there,

Thanks for your inquiry. Unfortunately, Aspose.Words does not support the requested feature at the moment. However, we have already logged this feature request as WORDSNET-12204 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-12204) have been fixed in this Aspose.Words for .NET 20.1 update and this Aspose.Words for Java 20.1 update.

It is very easy to float the table on the page at any position in Word document using table properties (RelativeHorizontalAlignment, AbsoluteHorizontalDistance, RelativeVerticalAlignment, and AbsoluteVerticalDistance) as shown below. We added this feature in Aspose.Words 20.1.
Following code example inserts two tables in the document and set their position.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert a table
Table table = builder.startTable();
builder.write("Table 1, cell 1");

// We can set the table's location to a place on the page, such as the bottom right corner

table = builder.startTable();
builder.write("Table 2, cell 1");

// We can also set a horizontal and vertical offset from the location in the paragraph where the table was inserted

doc.save(MyDir + "Table.ChangeFloatingTableProperties.docx");