+ Reply to Thread
Results 1 to 2 of 2

Adding a Chart or Worsheet??? with VB.NET

Hybrid View

  1. #1
    paul.lorena@gmail.com
    Guest

    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(Before:=excelBook.Sheets(tablename + 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!


  2. #2
    Tom Ogilvy
    Guest

    Re: Adding a Chart or Worsheet??? with VB.NET

    Charts.Add

    Worksheets.Add

    --
    Regards,
    Tom Ogilvy

    <paul.lorena@gmail.com> wrote in message
    news:1107797155.764567.230960@z14g2000cwz.googlegroups.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(Before:=excelBook.Sheets(tablename + 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!
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1