How to get or set Cell Vertical Alignment with TableStyle using Java

Hello,

How to set cell vertical alignment to the TableStyle?
It is possible to do this in MS Word, but I cannot find it how to do it in Aspose.

Using Aspose.Words JAVA 20.7

table_style_cell_vertical_alignment.png (63.1 KB)

Thank you!

@drizgelis

You can use CellFormat.VerticalAlignment property to set the vertical alignment of text in the cell. We suggest you please read the following article about formatting table’s cell.

Applying Formatting to Table, Row and Cell

@tahir.manzoor

I am talking about creating TableStyle:

In MS Word it is possible to set horizontal + vertical alignment for table cells in Table Style.

How to do it in Aspose?

@drizgelis

You need to use CellFormat.VerticalAlignment property to set the vertical alignment of text in the cell.

Could you please create sample document using MS Word that has desired table style and attach it here for our reference? Please also share the steps that you used to set the alignment for a table style.

We will investigate how you want your final Word output be generated like. We will then provide you more information on this along with code.

Adding a MS Word document with custom table style. Also adding a gif, how I have created custom table style.
I am not interested in setting manually CellFormat.VerticalAlignment but more in TableStyle which contains that information.

custom_table_style.zip (463.2 KB)

@drizgelis

We have logged new feature request as WORDSNET-21114 in our issue tracking system to set the vertical alignment of text in table’s cell. 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-21114) have been fixed in this Aspose.Words for .NET 21.1 update and this Aspose.Words for Java 21.1 update.