Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Excel through automation, and client hanging
Message
 
À
10/11/2000 14:37:07
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00440394
Message ID:
00440419
Vues:
9
>I have a form that uses Automation to create and format a large number of Excel 2000 spreadsheets. W98 clients hang after doing somewhere close to 100 xls files. NT workstation does not have this problem. I found a KB article (Q216400) suggesting that the program is exceeding the # of allowed COM interfaces requested at once (65k). Following the suggestions in the KB article produced no gain. Anyone else run up against this?

No, I've never run up against this problem, mostly because I can't imagine what the performance would be with 100 XLS files open. I did run across a problem in how many charts one could put into a workbook (which has been rectified) -- so I'd have to store the 60 or more charts in a series of XLS files. To acheive maximum performance, I shut each one down as I finished, before opening the next.

You don't need to do a series of CREATEOBJECT() calls. It should look something like:
oExcel = CreateObject("Excel.Application")

FOR I = 1 TO nHoweverManyWorkbooksYouNeed
  oBook = oExcel.Workbooks.Add()

  * Format workbook here

  lSaveChanges = .T.
  cFileName = "\mypath\myfile.xls"
  oBook.Close(lSaveChanges, cFileName)

ENDFOR
This should save a lot on resources.

- della Martin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform