Word format alignment

We are looking to formulate a word file with alignment control (not necessary a table but put the title, wide, colon and content into specific location with word wrap. Attached the file for your reference.

Anyone can help?

@hungwl Could you please attach your expected output in DOCX format here for our reference? Unfortunately, your requirements are not quite clear from the provided screenshot.

Sorry for the unclear question. The requests are:

  1. Rows of presentation in the output is controled by our program control to “Show” or “Hide”
  2. if not a table format, we can present fix length and width + Colon + Content for the columns

The following is target output

HEre is the expected result, there we would like to replace the test by parameter


OR

@hungwl Looks like you need to specify vertical alignment in the cell. You can achieve this using CellFormat.VerticalAlignment property.

Thanks for your reply. but can we generate the table/row based on programming “Show/Hide” control?

If we dont use table, can we control the position of the title, colon and the content/text/parameter with word wrap?

@hungwl Aspose.Words is limited to the features supported by the target document format. Please create your expected output in MS Word document and attach it here as DOCX document. We will check the document and let you know how to achieve the same using Aspose.Words.

Does it mean we cannot generate the table OR control number of row being generated? but we can only fill in content into the table?

On the otherhand, we accept not to use table but present them in by line break and control the position of title, colon and content.

Please kindly let me know if you got any suggestion. thank you.

@hungwl Su you can generate tables using Aspose.Words. For example you can use Mail Merge with Regions or LINQ Reporting Engine to achieve this.
But it would be much easier to help you if you provide you input and expected output documents in MS Word document format.

Official Complaint Letter and Request for Refund.docx (14.6 KB)

Enclosing the word file,
if Offer=A, we would like to output first table, the parameter “Option” could be A/B/C, Row “Rent” will be shown
if Offer=B, we would like to output second table, the parameter “Option” could be D/E/F, Row “Rent” will not be shown

Thank you very much for your great help.

@hungwl If you are using LINQ Reporting Engine to build your report, you can use <<if>> conditions to insert optional content:
https://docs.aspose.com/words/java/using-conditional-blocks/
If you are using mail merge, you can use IF field to achieve the same.