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.
Hi
Send me your project. I will do it.
On Sat, Apr 28, 2012 at 8:45 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
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.
Hi Ali,
to import data from excel you need to write following;
$libinclude xldump “name of your data set in excel” “name of your excel file.xls” " name of your data set in excel"
Make sure that your Excel file with data is in xls format.
Before importing data from Excel you need to define the name of your data set in excel. For this in Excel you go to “Formulas” then to “define name”.
For instance you have this data on fertilizer use by crops in your excel:
input
fertilizer
wheat 22
rice 68
maize 23
You define it as price, in lets say Excel file called “data.xls”. Then to import you write:
$libinclude xldump input data.xls input
But remember about defining your parameters, and auxiliaries.
Best,
Utkur
On Sat, Apr 28, 2012 at 6:15 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
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.