Free Support Forum - aspose.com

Add Rows to Worksheet

Hi, Am using aspose cells by importing data from datatable. Is it possible to add more rows from another datatable to worksheet before saving. If it is possible can anyone pls provide the solution

Thanks in Advance


Hi,


Yes, sure you may import as many DataTables as you wish in a single worksheet, one after another. Moreover, once you import a DataTable (completely) into the worksheet, you should use Cells.MaxDataRow and Cells.MaxDataColumn APIs to get the last row/col index which contains data in it, so you could specify the starting location (row,column) of your next DataTable. Also, once you import a data table, then you may simply use Cells.ImportDataRow too to import your desired row from your other datatable accordingly. See the document for your reference (there are a number of options to import data from diverse sources provided by Aspose.Cells):
http://www.aspose.com/docs/display/cellsnet/Importing+Data+to+Worksheets

Thank you.