CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Excel with .NET

  1. #1
    Join Date
    Mar 2001
    Location
    Israel
    Posts
    116

    Excel with .NET

    Hi

    in vb6 i used this code:

    Dim objEx As Excel.Application
    Dim objWb As Excel.Workbook

    objEx = New Excel.Application()
    objWb = objEx.Workbooks.Add

    objWb.ActiveSheet.Range("A2").Select()
    objWb.ActiveSheet.ActiveCell.FormulaR1C1 = "text"

    I used the Upgrate Wizard and the code remain the same
    but it's not working

    Does anyone has an exemple code that i can see?

    Thanks
    Limor

  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878
    use late binding
    Dim oXL As Object
    Dim oBook As Object
    Dim oSheet As Object

    oXL = CreateObject("Excel.Application")
    oBook = oXL.Workbooks.Add
    oSheet = oBook.Worksheets(1)
    .....
    Iouri Boutchkine
    iouri@hotsheet.NOSPAM.com

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured