Hello there---
I am working with OWC11 and I have successfully pulled data from a database and loaded it into a worksheet. The exported Excel file displays the data on a worksheet called Sheet. I would like to alter the worksheet name so that it says BaseInformation, then add an additional worksheet, but the code I have used is not making any changes to the exported file...
Dim xlsheet As New SpreadsheetClass
xlsheet.ActiveSheet.Name = "BaseInformation"
For Each dr As DataRow In ds.Tables(0).Rows
xlsheet.ActiveSheet.Cells(i, 1) = dr.Item("Name").ToString()
xlsheet.ActiveSheet.Cells(i, 2) = dr.Item("ProductNumber").ToString()
i = i + 1
Next
... this code successfully performs the For Each loop, but the xlsheet.ActiveSheet.Name line of code has no effect at all... any ideas as to why?
Thanks!
---kpobar
I am working with OWC11 and I have successfully pulled data from a database and loaded it into a worksheet. The exported Excel file displays the data on a worksheet called Sheet. I would like to alter the worksheet name so that it says BaseInformation, then add an additional worksheet, but the code I have used is not making any changes to the exported file...
Dim xlsheet As New SpreadsheetClass
xlsheet.ActiveSheet.Name = "BaseInformation"
For Each dr As DataRow In ds.Tables(0).Rows
xlsheet.ActiveSheet.Cells(i, 1) = dr.Item("Name").ToString()
xlsheet.ActiveSheet.Cells(i, 2) = dr.Item("ProductNumber").ToString()
i = i + 1
Next
... this code successfully performs the For Each loop, but the xlsheet.ActiveSheet.Name line of code has no effect at all... any ideas as to why?
Thanks!
---kpobar