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

Fatal Error Writing to Excel

Status
Not open for further replies.

adalli

Programmer
Feb 8, 2005
44
MT
Hi,

The version of Foxpro is 6.0. The application I am buliding is to write data into Excel 2003.

There are times when I am getting a Fatal Error at a stage when I am writing the data into the cells. Prior to this step I have other processes where I add more sheets and rename them, setup the borders and page setup and all works fine.

The Error code is "Fatal Error: Exception Code=C0000005".

I try to debug the application and it runs fine. The problem is that the error is intermittent even after I build the exe.

Installing the EXE on different PCs also gives different results, somtimes the extraction writes to the excel file well but other times I receive the fatal error.

The code I am using to declare the excel application is :

LOCAL oXlApp, oSheet, lcXlName, oWorkBook, oTemp
WAIT "Please wait while opening Excel" WINDOW NOWAIT
oTemp = createobject('Excel.Application')

Can anyone please help since it is getting a little frustrating?

Many thanks in advance
 
Have you installed Service Pack 5? Lots of the C0000005 error situations were cleared up by the various service packs along the way, and SP5 is the latest (I think).

Mike Krausnick
Dublin, California
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top