Free Support Forum - aspose.com
Table From ResultSet
Aspose.Words Product Family
julg89
January 17, 2017, 10:49am
1
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!
tahir.manzoor
January 18, 2017, 8:15am
2
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"
);