Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I finally fixed all excel C0000005 errors!
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
I finally fixed all excel C0000005 errors!
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01076566
Message ID:
01076566
Views:
517
And thought that for those of you also suffering from excels crashing when using office atomation then my soultion may be of help.

My situation was that clients wanted reports in excel. Office automation seemed the way, and it worked, aside from the fact that excel would 1 in 20 runs, randomly spurt a memory exception C0000005 type error. Thus bringing all the system down. When doing a few hundred runs a day and wanting it to auto run files coming in overnight, this was serious.

You guys helped cut the frequency of errors quite a bit with "its print drivers" or "careful about all variables to objects" but it didn't fix it.

XML did.

I realised the SpreadsheetML format was a way for me to write out reports from foxpro just by doing fputs to a text file. Perfect stable code, can run from any machine (does not need excel installed) , files are produced much faster (not having to wait for excel to open + dcom lag) and I'm guessing will open in any version of excel from 97? I've only tested it on office 2000 but so far it's perfect.

simply name your text file with .xls and excel will open it just as it would a native xls file.

the helpfiles and documentation for the SpreadsheetML format are downloadable from MS sorry I cant remember where off the top of my head, try a bit of an msdn search I guess.

Hope this helps all those who had the same problems as me, and I know there are quite a few.

if anyone needs some basic code examples or anything more feel free to ask, this issue bugged me for so long and I'd be happy to help save others from that pain.

Ken.

(oh and when my system put out the first day of files like this with not a single error I did go "WoooHooo!" quite loudly.)
Next
Reply
Map
View

Click here to load this message in the networking platform