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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Manipulating Excel through VFP 1

Status
Not open for further replies.

SGLong

Programmer
Jun 6, 2000
405
US
I've been able to create and manipulate an Excel spreadsheet from within VFP. When I close the save and close the spreadsheet (see code below), the XLS file is still tagged as being 'in use' and there is an instance of Excel running when I press a Ctrl-Alt-Del. How do I successfully close the file and terminate Excel?

** Code from tail end of my program...
oExcel.ActiveWorkbook.Save
wait window 'Saving updated spreadsheet...' timeout 3
release oExcel
close data all

 
I had this same experience with Word using its COM interface. I think what you need, before the RELEASE statement, is:

[tt]oExcel.Quit[/tt]

That should do the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top