Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel error
Message
From
13/01/2014 15:45:52
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Excel error
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01591785
Message ID:
01591785
Views:
64
Hi All:

I have a loop that processes a number of Excel files in a folder. It extracts information from each file and then closes the file. Then it loops to the next one. After about 160 files, the system chokes and throws an 'exception'. When I loop to the next file, the same exception. Here are the details:
FUNCTION ExcelFileOpen(toExcel, tcFile, tlUpdateLinks, toStuff, tlProtection, tcPassword, taSheetVisible)

LOCAL retparm, loWorkbook

retparm = .T.

TRY

	loWorkbook = toExcel.Workbooks.OPEN(tcFile, tlUpdateLinks)

CATCH TO ww

	errortextbuild(toStuff, ;
		'Error in ' + JUSTSTEM(tcFile) + ': ' + 'File cannot be opened', .F., .T., .T.)
	retparm = .F.
	SUSPEND

ENDTRY
Some values for the object 'ww' are:
baseclass  "Exception"
details       "80010105: The server threw an exception"
Errorno     1426
message   "OLE erroe code 0x80010105: The server threw an exception"
Any ideas?

Thanks,

Yossi
Next
Reply
Map
View

Click here to load this message in the networking platform