Where is my data? EPPlus gives me a range. Aspose.Cells give me an int

EPPlus returns a range …

ExcelRangeBase range = ws.Cells[r, 1].LoadFromDataTable(datatable, true);

Aspose.Cells.ImportDataTable returns an int.
Is this the number of rows?
Where is the number of columns.
Of is there a way to get the range of my imported table.

I import 30 DataTables into worksheet.
Each will have a style dependent of content.

Hi,


Well, yes, Cells.ImportDataTable returns the Total number of rows imported. For getting total number of columns, you may easily use DataTable.Columns.Count attribute for your needs.

If you need to get the table range, you may easily evaluate it. For example you start importing the DataTable into A1 cell, so you may evaluate the starting cell to calculate the indexes (0 based) of the end cell:
e.g
start_column = 0
start_row = 0
ending_row = DataTable.Rows.Count + start_row -1
ending_column = DataTable.Columns.Count + start_column -1
etc.

Also, kindly see the document for your reference:
http://www.aspose.com/docs/display/cellsnet/Importing+Data+to+Worksheets

Moreover, you should pick appropriate ImportDataTable overloaded version of the method for your specific needs, see the API Reference documentation for ImportDataTable API.

Let us know if you still have any confusion.

Thank you.