Working on a Mac and using GAMS Studio, I want to import data from a 4 dimensional csv.file via csv2gdx.
The particularity of the csv.file is that it has two row and two column labels, and that there a empty fields.
On a PC, what would work is:
Code: Select all
PARAMETER
MCS(*,*,*,*);
$CALL GDXXRW.EXE MCSAUTETA.xlsx par=MCS rng=MCS!A1:R18 Rdim=2 Cdim=2
$GDXIN MCSAUTETA.gdx
$LOAD MCS
$GDXIN
GO = MCS('I','PUB','AG','GVT');
As I cannot directly import the excel file on a mac, what I try to do is the following:
Code: Select all
PARAMETER
MCS(*,*,*,*)
$CALL csv2gdx AUTETA.csv output=AUTETA.gdx id=data index=1,2 values = 3..lastCol autoCol=column colcount=18 acceptBadUels=y
$gdxIn AUTETA.gdx
$load MCS = data
$gdxIn
GO = MCS('I','PUB','AG','GVT');
display GO
However, I get error message 495: Load dimensions are different.
When I use instead the option: index = 1,2,3, I do not get an error message, but the AUTETA.gdx file is empty.
I've tried many other options. To my understanding, option useHeader =Y is of no use to me, because it refers to a one dimensional column label.
I've also tried to define auxiliairy SETS for MCS(Column1,Column2,Row1,Row2), but is did not work either.
Finally, I tried to use of TABLE... like here: https://support.gams.com/interfaces:how ... onal_table but I did not find a workaround.
Does anybody have an idea how to solve this? I'm really stuck. Thank you in advance!