Page 1 of 1

Data read in Excel

Posted: Mon Jun 20, 2022 11:03 am
by Felix123
Hi there,

I am struggling with importing parameter values from excel. I have been trying to use the following command:

$libinclude xlimport parameter name.xlsx Tab!Range ;

What I get is an Error 282:
Unable to open include file
Hint: Does the filename need to be quoted?


I checked the name, range etc multiple times and I am sure that its correct. Also tried to set names for the range in excel and reference it in the above command. The xlsx is located in the same folder as the .gms file. Do I have to explicitly reference the directory?

Any help is appreciated!
Thanks in advance,
Felix

PS: I am using Mac, if this is by any chance relevant for this issue.

Re: Data read in Excel

Posted: Mon Jun 20, 2022 11:14 am
by Fred
PS: I am using Mac, if this is by any chance relevant for this issue.
It is highly relevant. xlimport is an external tool that uses gdxxrw under the hood which is a windows only tool.
For a modern cross-platform way to read/write data from/to Excel, please have a look at GAMS Connect (available as of GAMS version 39).

I hope this helps!

Fred

Re: Data read in Excel

Posted: Mon Jun 20, 2022 11:17 am
by Felix123
Fred wrote: 1 year ago xlimport is an external tool that uses gdxxrw
Didn't know that. Thanks!