I am getting the following error while executing my code in AIMMS.
“spreadsheet::RetrieveTable(BCLOAD.xlsx, Load_Base(h,y,a), B3:CM8786, A3:A8786, B1:CM2, Load, 1) unable to get a handle to the workbook: Could not open Excel.”
I believe it is happening after some automatic updates on my Microsoft office. Previously it was working fine.
I tried to reinstall my office, change my excel file name, or even copied the project folder to my PC from the google drive. None of them resolved the issue.
It would be grate if you can help me with this issue.
Best answer by rezakhaliliView original
It seems to me you might be missing parentheses around the file name, the ranges and the sheet name
For reference: https://documentation.aimms.com/functionreference/data-management/spreadsheet-functions/spreadsheet_retrievetable.html
if that is not the case and it worked before; best to share the project here and send it to firstname.lastname@example.org.
Good to be aware of: We recommend using the newer AXLL library (which is newer and can read XLS/XLXS files without the need of having Excel installed). This library also has functions to determine the number of rows with data so you do not have to hard code a large range.
It was working previously with this syntax.
However, I used the AXLL library and it solved the issue.