Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel 97/2000 OLE Automation in Windows 2000
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Excel 97/2000 OLE Automation in Windows 2000
Miscellaneous
Thread ID:
00374785
Message ID:
00374785
Views:
66
Hi:

I'm having a Excel spreadsheet refresh problem using VFP 5.0a on a Win2K professional work station..

This.oExcel = CREATEOBJECT("EXCEL.APPLICATION")
This.oExcel.WorkBooks.Open("c:\myexcelform.xls")
This.oExcel.WorkBooks(1).RefreshAll()
This.oExcel.ActiveSheet.PrintOut()
This.oExcel.WorkBooks(1).Close(.F.)
This.oExcel.Quit()

The Excel spreadsheet has two sheets defined--"Form" and "Data". The "Form" is the active sheet and it's the one that gets printed. The "Data" sheet is using the Visual FoxPro ODBC driver configured to look for a _free_ table.

When I printout the form occasionally the "Data" sheet does not refresh. Sometimes it works and other times is refuses to refresh and prints only the information that is stored in the Excel sheet.

One thing I want to point out is that there is no problem doing this in Win 95/98/NT--only in Win2K does the refresh problem occur. This problem occurs using either Excel 97 or 2000 sp1a.

Is anybody else having problems using OLE automation with Win2k?

Thanks!
Next
Reply
Map
View

Click here to load this message in the networking platform