Results 1 to 3 of 3

Thread: Reading xls

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Trondheim, Norway
    Posts
    65

    Question

    How do I read from an Excel file, with Rich Text, Images and stuff?

    D

  2. #2
    Lively Member
    Join Date
    Sep 1999
    Location
    Liverpool, UK
    Posts
    64
    You'll need to make a reference to 'Microsoft Excel 9.0 Object Library' in your project.

    This code should get you on your way.....

    Code:
    Dim ExApp As Excel.Application
    Set ExApp = New Excel.Application
    
    ' make Excel visible
    ExApp.Visible = True
    ' open the xls file
    ExApp.Workbooks.Open "c:\my spreadsheet.xls"
    
    ' show the text from cell A1
    MsgBox Range("A1").text
    Try recording some macros in Excel, that will give you most of the code you'll need to use.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Trondheim, Norway
    Posts
    65
    Thanks, man.
    When I set ExApp.Visible to False, it worked almost exactly the way i wanted it to. But still I can't get the pictures that live in the sheet.

    D

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