importing tables from excel

Dear all
How is it possible to import tables which are so large from excel? I really appreciate your help
Regards

\

Dear Mahmood,

One way is use of xls2gms.exe to convert your table in text format and past on gams.

Regards


On Tue, Apr 14, 2015 at 12:17 PM, mahmood golabi wrote:

Dear all
How is it possible to import tables which are so large from excel? I really appreciate your help
Regards


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.

Dear Aryabod
Thanks, of course you are right, but the size of my tables is so large, like 500*500
So I am looking for an efficient procedure for importing these large tables

\

Try the following and see if it is fast enough for your application. On my system it takes about 4 seconds total,

–Paul

set i/i1i500/
j/j1
j500/;
parameter A(i,j), B(i,j);
A(i,j)=1000 * Ord(i) + Ord(j);
execute_unload ‘test1.gdx’, A;
execute ‘gdxxrw test1.gdx o=test1.xlsx par=A rng=sheet1!A1 dim=2’;
execute ‘gdxxrw test1.xlsx o=test2.gdx par=A rng=sheet1!A1 dim=2’;
execute_loadDC ‘test2.gdx’, B=A;


On Tue, Apr 14, 2015 at 1:12 PM, mahmood golabi wrote:

Dear Aryabod
Thanks, of course you are right, but the size of my tables is so large, like 500*500
So I am looking for an efficient procedure for importing these large tables


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.



\

Paul van der Eijk
GAMS Development Corporation
Tel : (202) 342-0180 Fax : (202) 342-0181
Email: pvandereijk@gams.com
Web : http://www.gams.com


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.

Dear Paul
Thanks for your response, I am new in gams, actually I didn’t understand why 1000*ord (i)*ord (j) ?
Also what is the general code for importing?
What is gdxxrw? Dim? Is execute a key word? Can you please help me? I am working on my thesis for facility location problem of a very big problem and really it is not possible to import tables by hand
best regards

\

I need the general procedure for importing a table from excel to gams, like the key words needed, the symbols and … from the beginning of importing process up to end of it and the meaning of that symbols and key words
so I appreciate any help and response from you, thanks again


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.

Mahmood, perhaps, the following Youtube video will help you discover the steps:

GAMS and Excel - Using GDX to Transfer Data
https://www.youtube.com/watch?v=5PEjOUOL3sU

On 4/15/2015 10:56 AM, mahmood golabi wrote:

I need the general procedure for importing a table from excel to gams, like the key words needed, the symbols and … from the beginning of importing process up to end of it and the meaning of that symbols and key words
so I appreciate any help and response from you, thanks again

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.



Toni Lastusilta, Ph.D.


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.

Dear all
thanks for your nice responses, I found the best procedure for importing tables from excel to gams :

table tt(v,u)
$call =xls2gms I=Drive name:\folder name\file name.xls O=Drive name:\folder name\name for output.inc R=sheet1!a2:g8
$include Drive name:\folder name\name for output.inc
;


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.