Results 1 to 3 of 3

Thread: [RESOLVED] working with Excel from VB2005..

Hybrid View

  1. #1
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: working with Excel from VB2005..

    Just ran the following under VS2005 and worked fine

    Code:
          Dim oXL As Microsoft.Office.Interop.Excel.Application
          Dim oWB As Microsoft.Office.Interop.Excel.Workbook
          Dim oSheet As Microsoft.Office.Interop.Excel.Worksheet
          Dim oRng As Microsoft.Office.Interop.Excel.Range
    
          ' Start Excel and get Application object.
          oXL = CType(CreateObject("Excel.Application"), _
             Microsoft.Office.Interop.Excel.Application)
    
          oXL.Visible = True
          ' Get a new workbook.
          oWB = oXL.Workbooks.Add
          oSheet = CType(oWB.ActiveSheet, _
             Microsoft.Office.Interop.Excel.Worksheet)

  2. #2
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,714

    Re: working with Excel from VB2005..

    Simple working demo attached in 2005 project. Personally I use Aspose cells for Excel work.

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