Hi everyone, I'm a economics students and I'm trying to export data from excel to GAMS but
Kindly help.
couldn't export. I'm attaching a GAMS code which I tried to export data from excel.Exporting data from Excel to GAMS
Re: Exporting data from Excel to GAMS
Two mistakes.
1. File extension .xlxs instead of .xlsx
2. You should not indent $call and $gdxin. Remove the space behind it
After fixing, the following code works
- Atharv
1. File extension .xlxs instead of .xlsx
2. You should not indent $call and $gdxin. Remove the space behind it
After fixing, the following code works
Code: Select all
set r row labels /r1,r2/
c coloumn labels/c1,c2/;
Parameter p(r,c);
$call GDXXRW indata.xlsx trace=3 par=p rng=sheet1!a1 rdim=1 cdim=1
$GDXIN indata.gdx
$load p
$GDXIN
Display p;