Hi Kris,
Sorry for the delay in getting back to you.
Please try this
Dim dt As DataTable = mySheet.ExportDataTable(mySheet.UsedRange, False)
Me.DataGrid1.DataSource = dt
Here is a winforms sample that demonstrates the usage, the code is the same for webforms application also
Sample
Please let me know if you have any questions.
Thanks,
Stephen.
>
>Okay. I''m moving along a little with this...
>But I''m still not getting anything into my DataTable using ExportDataTable.
>
>Could someone please tell me what I''m doing wrong?
>
> Dim excelEngine As ExcelEngine = New ExcelEngine
> Dim application As IApplication = excelEngine.Excel
>
> Dim postedFile As HttpPostedFile = uploadedFile.PostedFile
> Dim filename As String = Path.GetFileName(postedFile.FileName)
> Dim myWorkBook As IWorkbook = ExcelUtils.Open(filename)
>
> Dim sheet As IWorksheet = myWorkBook.Worksheets(0)
> Dim lastrow As Integer = sheet.UsedRange.End.Column
> Dim i As Integer
> Dim dt As DataTable
> Dim dt2 As DataTable
>
>
> For i = 1 To lastrow - 1 Step i + 1
>
> ''dt = sheet.ExportDataTable(i, 1, lastrow, 1, True)
> dt2 = sheet.ExportDataTable(sheet.Range(i + 1, 1), False)
>
> Next
>
> DataGrid1.DataSource = dt2
> DataGrid1.DataBind()
> DataGrid1.Visible = True
>
>Thanks in advance