Dim ef2 As New Microsoft.Office.Interop.Excel.Application Dim ws As New Microsoft.Office.Interop.Excel.Worksheet 'Imports all the tables from DataSet to new file. For Each table In [dsExportToSAPData].Tables 'Add new worksheet to the file. ws = ef2.Worksheets.Add(table.TableName) 'Change the value of the first cell in the DataTable.; table.Rows(0)(0) = "This is new file!" 'Insert the data from DataTable to the worksheet starting at cell "A1". ws.InsertDataTable(table, "A1", True) Next
table.Rows(0)(0) = "This is new file!"
table.Rows(1)(1) = "This is new file!"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)