Table From ResultSet

Hello!


How I can insert a table from the result set into an specific place in Word Document.

I.E.: I want to insert into the 3rd. page of my Document

Thanks!
Hi there,

Thanks for your inquiry. Please note that the preferred way of inserting data from a DataTable/ResultSet into a document table is by using Mail Merge with Regions. Please refer to the following articles:

Mail Merge with Regions Explained
How to Execute Mail Merge with Regions

If you do not want to use mail merge, please refer to the following article:
How to Build a Table from a DataTable

Moreover, please use com.aspose.words.net.System.Data.DataTable constructor to convert ResultSet object into DataTable as shown below.

java.sql.ResultSet resultSet = ...
DataTable datatable = new DataTable(resultSet, "Orders");