Hi,
I need to read a parameter form excel, so I tried the code below:
$CALL GDXXRW.EXE results.xls par=Level rng=sheet1!b1:D2
Parameter Level(j);
$GDXIN results.gdx
$LOAD Level
$GDXIN
But the following message appears in process window as an error:
“Load dimension are different”
I think I need a simple example of importing a parameter from an excel sheet. It would be appreciative if someone gave me a helpful example.
Waiting for your reply.
Thanks.
I think you need to tell gdxxrw about proper dimension i.e. rdim or cdim. Please refer the gdxutils.pdf.
On Fri, Nov 20, 2015 at 9:55 PM, ‘Mahdi Rouholamini’ via gamsworld wrote:
Hi,
I need to read a parameter form excel, so I tried the code below:
$CALL GDXXRW.EXE results.xls par=Level rng=sheet1!b1:D2
Parameter Level(j);
$GDXIN results.gdx
$LOAD Level
$GDXIN
But the following message appears in process window as an error:
“Load dimension are different”
I think I need a simple example of importing a parameter from an excel sheet. It would be appreciative if someone gave me a helpful example.
Waiting for your reply.
Thanks.
Partha Das
Junior Research Fellow MNRE, MNIT Jaipur
+91 8239 375 906 | partha67@gmail.com | Skype: daspartha22 | Center for Energy and Environment, MNIT Jaipur, ​Rajasthan (India) - 302017
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Hi ???
Look at the documentation on gdx. Or in the McCarl Gams guide. Both are available from your GAMSIde under Help
Renger
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com]
Sent: Freitag, 20. November 2015 17:25
To: Gamsworld
Subject: reading a parameter form excel
Hi,
I need to read a parameter form excel, so I tried the code below:
$CALL GDXXRW.EXE results.xls par=Level rng=sheet1!b1:D2
Parameter Level(j);
$GDXIN results.gdx
$LOAD Level
$GDXIN
But the following message appears in process window as an error:
“Load dimension are different”
I think I need a simple example of importing a parameter from an excel sheet. It would be appreciative if someone gave me a helpful example.
Waiting for your reply.
Thanks.
\
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
Reply-to: gamsworld@googlegroups.com
“Parameter Level(j);” declares the parameter as one dimensional. If you open results.gdx, for example, in the GAMSIDE, then you can find out that the dimension (Dim) of symbol “Level” is Not one. Hence, declare parameter “Level” with the same number of dimensions as in file “results.gdx”. You can find an easy example from GAMSIDE->Model Libraries->GAMS Data Utilities Models>GDXXRWExample5#016 , which can also be found from:
https://www.gams.com/datalib/libhtml/GDXXRWExample5.htm
Furthermore, you might find the following links helpful:
https://www.youtube.com/watch?v=5PEjOUOL3sU
http://www.gams.com/help/topic/gams.doc/userguides/userguide/_u_g__g_d_x.html?cp=0_2_0_2_12
Best,
Toni Lastusilta
On Saturday, November 21, 2015 at 11:09:53 AM UTC+1, Mahdi Rouholamini wrote:
Hi,
I need to read a parameter form excel, so I tried the code below:
$CALL GDXXRW.EXE results.xls par=Level rng=sheet1!b1:D2
Parameter Level(j);
$GDXIN results.gdx
$LOAD Level
$GDXIN
But the following message appears in process window as an error:
“Load dimension are different”
I think I need a simple example of importing a parameter from an excel sheet. It would be appreciative if someone gave me a helpful example.
Waiting for your reply.
Thanks.
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.