Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot close Excel
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00937493
Message ID:
00937555
Views:
9
After oExcel.Quit
release oExcel

HTH
Jeff

>I'm running into a bit little trouble. I'm trying to convert a XLS file into VFP table (then to SQL). The file comes several times a week (18,000 rows)from an outside source and the first column is an ID number. I can read the data into a table but sometimes (about 1 in 200) the ID number is imported as a zero (0). This is due to someone setting the format to 'number' instead of 'general.' It seams that VFP will see the first cell's format and convert all based on this and when it gets to a cell that is formatted as differet (i.e., 'number') it zeros out.
>
>The only way I can figure to solve this problem is to open the file and convert the columns to a preset format then save -- using automation. The problem is oExcel.Quit() does not close the instance of Excel (it still shows up in the Task Manager) and therefor still keeps a lock on the file (even if I issue oExcel.ActiveWorkbook.Close).
>
>How do I close the running instance of Excel?
>
>TIA, John

It's Time to get a gun.

That's what I've been thinkin.

I think I can afford one, If I do a little less Drinkin.

www.TrueGeeks.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform