How to link excel to GAMS

Dear GAMS users!
Hope you are all fine.
I am new to GAMS and i am wondering how i can link excel to GAMS. My
raw data are in excel and i need to import them to GAMS and use them
in the model that is written in GAMS.
As i have searched the net i found that the answer is gdx.
But as i am a beginner in GAMS i do not know what should i do with
gdx.
Does any one has an idea of what should i do?!?
Thanking you all in advance;
Ali

\

Dear Ali

There is pdf file that you can download from gams.com (search the
suitable keywords).
It’s a good manual for gdx with many examples.

but totally, you need to make a gdx file from you excel file with
gdxxrw. then you can load the gdx file to your gams programe.

bests


On 4/28/12, Ali Zarrineh wrote:

Dear GAMS users!
Hope you are all fine.
I am new to GAMS and i am wondering how i can link excel to GAMS. My
raw data are in excel and i need to import them to GAMS and use them
in the model that is written in GAMS.
As i have searched the net i found that the answer is gdx.
But as i am a beginner in GAMS i do not know what should i do with
gdx.
Does any one has an idea of what should i do?!?
Thanking you all in advance;
Ali


“gamsworld” group.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.



– Babak Saleck Pay M.Sc Socio-Economic System Engineering Group of Industrial Engineering University of Tehran Tehran,Iran

Hi,

See the following code for loading data in GAMS from .xls, rows and columns name in .xls file must be same as in the GAMS variables. for that see the attached file.


SET Assets /x1x10/;
SET Time /t1
t14/;

PARAMETER AssetReturns(Assets,Time) name of parameter

$CALL GDXXRW Unitled1.xls par=AssetReturns rng=a1:o11 Cdim=1 Rdim=1
$GDXIN Unitled1.gdx
$LOAD AssetReturns
$GDXIN

display AssetReturns;



On Sat, Apr 28, 2012 at 10:19 PM, Ali Zarrineh wrote:

Dear GAMS users!
Hope you are all fine.
I am new to GAMS and i am wondering how i can link excel to GAMS. My
raw data are in excel and i need to import them to GAMS and use them
in the model that is written in GAMS.
As i have searched the net i found that the answer is gdx.
But as i am a beginner in GAMS i do not know what should i do with
gdx.
Does any one has an idea of what should i do?!?
Thanking you all in advance;
Ali


Untitled1.xls (7 KB)

Check this out…

On Sat, Apr 28, 2012 at 19:49, Ali Zarrineh wrote:

Dear GAMS users!
Hope you are all fine.
I am new to GAMS and i am wondering how i can link excel to GAMS. My
raw data are in excel and i need to import them to GAMS and use them
in the model that is written in GAMS.
As i have searched the net i found that the answer is gdx.
But as i am a beginner in GAMS i do not know what should i do with
gdx.
Does any one has an idea of what should i do?!?
Thanking you all in advance;
Ali


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.



\

Aut Viam Inveniam Aut Faciam


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Hello,

Like you I am a beginner and I found this post very useful.

http://groups.google.com/group/gamsworld/browse_thread/thread/ba3c7bb5663a5fde?pli=1

HTH,

Paolo



On Apr 28, 5:49 pm, Ali Zarrineh wrote:

Dear GAMS users!
Hope you are all fine.
I am new to GAMS and i am wondering how i can link excel to GAMS. My
raw data are in excel and i need to import them to GAMS and use them
in the model that is written in GAMS.
As i have searched the net i found that the answer is gdx.
But as i am a beginner in GAMS i do not know what should i do with
gdx.
Does any one has an idea of what should i do?!?
Thanking you all in advance;
Ali

\