Updating Excel Data in Aimms

35 views
Skip to first unread message

angelma...@gmail.com

unread,
May 3, 2019, 1:51:44 PM5/3/19
to AIMMS - The Modeling System
Hi all, 


I am trying to retrieve some parameters from excel spreadsheet into Aimms as follows:


Spreadsheet::SetActiveSheet( WorkbookName, "test" );

Spreadsheet::RetrieveParameter( WorkbookName, Demands, "DemandRange" );


However, when I change the values of "Demands" in excel and run the same procedure for the second time, the values in Aimms arent updated. 

After several attempts, I found that the values can only be updated if I close and reopen the Aimms project, and run the procedure again. Is there any solution to this?

Thanks a lot! :)))))))




Mohan

unread,
May 3, 2019, 6:06:19 PM5/3/19
to AIMMS - The Modeling System
Hello,

Just close the Excel file using SpreadSheet::CloseWorkbook at the end of your procedure. The changes will be saved only when the workbook is not open in AIMMS.

angelma...@gmail.com

unread,
May 4, 2019, 5:32:49 AM5/4/19
to AIMMS - The Modeling System
Hi Mohan,

Thanks for your advice, it works! :))
Reply all
Reply to author
Forward
0 new messages