![]() |
Adding a Chart or Worsheet??? with VB.NET
Hi:
I have this problem, I have to insert first a chart, after a worksheet to an excel file with VB.NET. I'get an error in line 3 (below) "not found public member 'Cells' in type 'Chart'" How Can I define in line (1) the type of worksheets??? 1 excelBook.Sheets.Add(Befo=excelBook.Sheets(tab lename + 1)) 2 For Each dcColumn In dstDataset.Tables(tablename).Columns 3 excelApp.ActiveSheet.Cells(1, x) = dcColumn.ColumnName 4 x += 1 5 Next thanks in advance! |
Adding a Chart or Worsheet??? with VB.NET
Charts.Add
Worksheets.Add -- Regards, Tom Ogilvy wrote in message oups.com... Hi: I have this problem, I have to insert first a chart, after a worksheet to an excel file with VB.NET. I'get an error in line 3 (below) "not found public member 'Cells' in type 'Chart'" How Can I define in line (1) the type of worksheets??? 1 excelBook.Sheets.Add(Befo=excelBook.Sheets(tab lename + 1)) 2 For Each dcColumn In dstDataset.Tables(tablename).Columns 3 excelApp.ActiveSheet.Cells(1, x) = dcColumn.ColumnName 4 x += 1 5 Next thanks in advance! |
All times are GMT +1. The time now is 02:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com