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

Free Support Forum - aspose.com

Dynamic display of data in Rows and Columns

Hi,

I have a requirement where i have to display the data dynamically in excel. The data comes from DB, the number of rows and columns may vary based on the data. How can i loop this data and insert rows and columns by populating the values coming from DB.

Hi,


Well, Aspose.Cells for Java does support to import data from the resultset, so you may try to create an SQL statement after making connection with the database. You may fill the data into the ResultSet and try to use Cells.importResultSet() method to import data from the resultset to fill the worksheet cells in rows and columns for your requirements. Please see the document what different options are available to import data from different data sources (including result set) to worksheet cells for your reference:
http://www.aspose.com/docs/display/cellsjava/Importing+Data+to+Worksheets


Thank you.