This project has moved and is read-only. For the latest updates, please go here.

Add datatable in customstarting cell range

Mar 31, 2014 at 4:58 PM
Edited Apr 3, 2014 at 1:52 PM
I want to use this method

wb.Worksheets.Add(dataTable, "Data")

but I need to add the date range in the first 2 cells of my xml. I tried to add the datatable, copy the whole data a couple of cells below, but I lose the sorting function in the excel.

How can I add the dataTable in another location? Or how can I move a range of cells without losing the sorting header cell?

Thank you a lot!
Jul 9, 2014 at 2:27 PM
hi
for example
DataTable datT=your datatable;
                var wb = new XLWorkbook();
                var ws = wb.Worksheet(1); //your worcksheet
                var tableWithData = ws.Cell(3,1).InsertTable(datT);//start place table in A3 cell
work for me...