Don't know whats wrong in importing this excel file

Hi, I am trying to import to import a few data points from excel file
to learn how to import files, but the program is not reading any
values. I have 3 values listed in excel file in A2, A3, A4 cells
respectively and cell A1 has the label MC. Pl suggest what is going
wrong here.

Set I /1*3/ ;

$CALL GDXXRW.EXE MC.xls Par = C rng=A1:A4 Cdim=1
*Parameter C(I) ‘Marginal Cost of each product’ ;

$GDXIN MC.gdx
Parameter C(I) ‘Marginal Cost of each product’ ;
$LOAD C
Display C;
$GDXIN

Thanks
Ashu
–~–~---------~–~----~------------~-------~–~----~
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
-~----------~----~----~----~------~----~------~–~—

\

Ashu,

Since this is a one dimersional parameter all values need labels. So
to read this you need in column A (starting with A1) cells label1,
label2, label3. In column B you need the values (starting with B1).
There are a bunch of very simple examples in the gdxxrw documentation
(part V in GDX utils documentation). Please check these out:
http://www.gams.com/dd/docs/tools/gdxutils.pdf

Regards,
Michael Bussieck - GAMSWorld Coordinator

On 19 Jun., 17:22, ashu wrote:

Hi, I am trying to import to import a few data points from excel file
to learn how to import files, but the program is not reading any
values. I have 3 values listed in excel file in A2, A3, A4 cells
respectively and cell A1 has the label MC. Pl suggest what is going
wrong here.

Set I /1*3/ ;

$CALL GDXXRW.EXE MC.xls Par = C rng=A1:A4 Cdim=1
*Parameter C(I) ‘Marginal Cost of each product’ ;

$GDXIN MC.gdx
Parameter C(I) ‘Marginal Cost of each product’ ;
$LOAD C
Display C;
$GDXIN

Thanks
Ashu
–~–~---------~–~----~------------~-------~–~----~
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
-~----------~----~----~----~------~----~------~–~—

\