Results 1 to 3 of 3

Thread: how do get data from excel

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2001
    Location
    Albuquerque
    Posts
    1

    Question how do get data from excel

    I am writing an application that needs to get input from an excel worksheet and out output to another spreadsheet in the same file. Using OLE Container Control, I was able to see the spreadsheet by using sourceData but I am not sure how to get the information stored in an individual cell. I tried sourceItem but that is not working. I must be doing something wrong, any help would be appreciated

    Raj Morey

  2. #2
    Fanatic Member
    Join Date
    Jan 2001
    Location
    Vietnam
    Posts
    613
    You need to make a reference to Microsoft Excel to your project. Then create this object.

    If you have problem, I'll send you an article on how to use it.

    Regards,
    TheBao

  3. #3
    jim mcnamara
    Guest
    Don't forget - there is a COM hierarchy in Excel. Three objects are required to access data at the cell level -
    Excel.Application
    Workbook
    Worksheet

    I have had problems doing some operations because I did not do a prerequisite method on a higher level object. Doh.

    Most of the time now, I just turn on macro recording and do whatever it is I want to automate in Excel. Then I shut off recording the macro, edit the macro, and cut and paste the code into VB. Several times this has shown me some hierarchic steps I've neglected.

    hth

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