Im writing an entire datatable into an excel workbook. I want to copy everthing from the datatable into the second worksheet of an excel template. How do I write an entire row at once?
Public Shared Function Fill_Sheet_2(ByVal dt As DataTable, ByVal template As String, ByVal sheetName As String)
Dim app As New Excel.Application
Dim wkbk As Workbook
Dim wksheet As Excel.Worksheet
Dim row As Integer = 0
Dim column As String
wkbk = app.Workbooks.Open(template)
wksheet = wkbk.Worksheets.Item(sheetName)
For Each dr As DataRow In dt.rows
'???write row into excel???