LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Limits on opening Excel Workbooks

Using the C Excel API, I am attempting to open, read, and close numerous
Excel workbooks. A representative code snippet is below. After opening the
same 4 meg file 936 times, get an inexplicable Excel crash. I appear to have
exceeded the limits of an Excel memory heap.

Any tips on how to test for/prevent a crash, on how to free Excel memory in
this case?

XLOPER xRes;
for ( int i = 1; i <= 1000; i++ )
{
// open file read only
int res = Excel(xlcOpen, &xRes, 3, TempStr(" workbook.xls"),
TempNum(0), TempBool(TRUE) );
xRes.xltype |= xlbitXLFree;
Excel( xlFree, 0, 1, (LPXLOPER) &xRes );
// close file
Excel(xlcClose, &xRes, 1, (LPXLOPER)TempBool(FALSE));
}

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening multiple excel workbooks at once Bill Excel Discussion (Misc queries) 0 March 6th 10 01:12 AM
Opening multiple workbooks in Excel bdigs Excel Discussion (Misc queries) 3 February 21st 08 02:35 AM
Opening Excel workbooks Brian G Excel Worksheet Functions 2 December 7th 07 12:49 AM
Problems opening excel workbooks dull40 Excel Discussion (Misc queries) 1 November 6th 07 05:56 PM
How do I stop IE opening excel workbooks ? Andy Rose Excel Discussion (Misc queries) 1 March 30th 06 09:48 AM


All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"