Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using Excel through automation, and client hanging
Message
 
 
To
10/11/2000 14:37:07
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00440394
Message ID:
00440419
Views:
13
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform