Data read in Excel Topic is solved

questions about GAMS' tools
Post Reply
Felix123
User
User
Posts: 2
Joined: 1 year ago

Data read in Excel

Post 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.
Fred
Posts: 372
Joined: 7 years ago

Re: Data read in Excel

Post 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
Felix123
User
User
Posts: 2
Joined: 1 year ago

Re: Data read in Excel

Post by Felix123 »

Fred wrote: 1 year ago xlimport is an external tool that uses gdxxrw
Didn't know that. Thanks!
Post Reply