Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Automation Resources

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I want to write a program in VFP that would read data in a particular excel sheets and cells but I couldn't find any from the samples any body could help me with this or anyone can point a link to resources of complete excel automation in VFP?

What I want to happen exactly is I will read data in cells from excel sheets. In one excel file I contain several sheets in a worksheet and all of them should be read and compared from the values of my database.

Any help would be appreciated. I need this badly, thanks.
 
If you installed the sample code along with the help file from the MSDN CD, enter:
DO _samples+"\solution\solution.app"

Then check the sample code in "Automate a Microsoft Excel Spreadsheet" under ActiveX -> Automation. While it doesn't have your exact scenario, it's a good place to start.

Also a couple KnowledgeBase articles might help:
- HOWTO: Use OLE Automation to Add Data to Excel Sheet
- OLE Examples for Taking Control of Excel from Visual FoxPro

Rick
 
Or you can try the Hentzenwerke Publishing, at
The book you need is "Microsoft Office Automation with Visual FoxPro".

Hope this helps Grigore Dolghin
Class Software
Bucharest, Romania
 
Thanks for the reply, the knowledge base from Microsoft actually helps. I should have read it before. But one more question, I issued a command from the vfp command window as x = getobject('c:\myexcel.xls') but I used to receive the message Excel Ole automation error. What is it supposed to mean? I used to copy this command from the online documentation of vfp. Anybody could explain this to me? Thanks again.
 
You should create the Excel object before, using loExcel = CREATEOBJECT("Excel.Application").

Have you created it?

Hope this helps Grigore Dolghin
Class Software
Bucharest, Romania
 
Related question. . .can a person automate MS Money into VFP6 like excel or msgraph etc.? THX in advance for your reponse!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top