Excel memory overflow?
Posted: 05 Apr 2022, 05:08
I made an AHK script that does the following:
to get values from the excel files to read.
The script works as expected, but after about 300 files Excel stops reacting and complains about insufficient memory. The actual message is this:
- Open an empty Excel sheet
- One by one, read a bunch of excel files from a chosen folder and copy the contents of Cell A1
- Write copied content in the original sheet
Code: Select all
Loop, Files, % Path "\Invoice*.xlsx"
{
WB := ComObjGet(A_LoopFileFullPath)
; do stuff
}
The script works as expected, but after about 300 files Excel stops reacting and complains about insufficient memory. The actual message is this:
There isn't enough memory to complete this action.
Try using less data or closing other applications.
To increase memory availability, consider:
- Using a 64-bit version of Microsoft Excel.
- Adding memory to your device