Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel error
Message
 
 
À
13/01/2014 17:20:10
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01591785
Message ID:
01591800
Vues:
32
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform