|
-
Jun 27th, 2001, 02:26 PM
#1
Thread Starter
New Member
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
-
Jun 27th, 2001, 06:17 PM
#2
Fanatic Member
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
-
Jun 27th, 2001, 07:01 PM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|