MessageBox.Show(wshTest.Range("A8").Value.ToString)
wshTest.Copy(wbkDest.Sheets()) Private Sub btnGenerateReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGenerateReport.Click Dim dpl As New List(Of DatasetPair) 'Try Me.Cursor = Cursors.WaitCursor Dim intSheetCount As Integer = 0 For i As Integer = 0 To lvMatchedDvid.Items.Count - 1 Dim dp As New DatasetPair dp.DataVersionIdOne = lvMatchedDvid.Items(i).Text.ToString dp.DataVersionIdTwo = lvMatchedDvid.Items(i).SubItems(1).Text.ToString intSheetCount += 1 dp.SheetId = intSheetCount dpl.Add(dp) Next Dim wb As Excel.Workbook = Utilities.CreateWorkbook() Dim strFilePath As String = wb.Path.ToString & "\" & wb.Name.ToString For Each dp As DatasetPair In dpl Dim excelApp As New Excel.Application Dim ws As New Excel.Worksheet ws = GenerateWorksheet(dp) Dim strSourceFilePath As String strSourceFilePath = wb.Path.ToString & "\" & wb.Name.ToString Dim wbkDest As Excel.Workbook = excelApp.Workbooks.Open(strFilePath) Dim wshTest As Excel.Worksheet = DirectCast(ws, Excel.Worksheet) Dim wbkSource As Excel.Workbook = excelApp.Workbooks.Open(strSourceFilePath) MessageBox.Show(wshTest.Range("A8").Value.ToString) wshTest.Copy(wbkDest.Sheets()) Next
wshTest.Copy(wbkDest.Worksheets())
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)