Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel error
Message
 
 
To
13/01/2014 17:20:10
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
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:
01591800
Views:
38
>Are you suggesting something like this:
>
>
>for i = 1 to lnNumberOfFiles
>
>   if mod(1,100) = 1
>     FireUpExcel()
>  endif
>
>   loWorkbook = _screen.oStuff.oExcel.Workbooks.OPEN(tcFile, tlUpdateLinks)
>
>   Code...
>   Code...
>
>   loWorkBook.CLOSE(tlSavetheFile)
>
>next
>
>return
>
>function FireUpExcel()
>
>if ExcelisActive()
>  _screen.oStuff.oExcel.QUIT()
>  _screen.oStuff.oExcel = NULL
>endif
>
>SET MESSAGE TO 'Activating Excel...'
>_screen.oStuff.oExcel = CREATEOBJECT("Excel.application")
>_screen.oStuff.oExcel.VISIBLE = .F.
>
>return .t.
>
>
>>You're saying it chokes after ~160 files, so to play if safe I'd say try 100 files at once.
>>

Yes, this sounds like a good approach to try. We may also want to add some memory stuff here, check sys(1016) in Help.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform