import cvs file with txt data for table

Hello,

I have defined in my model the following table which I then try to fill with data coming from a CVS file called Ingredients.csv.

But I get the following error message (Real number expected). Cant I use text data in my table?

— .Ingredients.csv(2) 3 Mb 1 Error
*** Error 1 in \GVECSM0001DATA.ds.givaudan.com\homedir$\cacoteh\Desktop\GamsReporting\Ingredients.csv
Real number expected
— .Ingredients.csv(3) 3 Mb 2 Errors
*** Error 1 in \GVECSM0001DATA.ds.givaudan.com\homedir$\cacoteh\Desktop\GamsReporting\Ingredients.csv


-----------model--------------------
sets

j “product numbers” /1*42/
z “information” / material , descr / ;

table ing(j, z) “ingredients”
$ondelim
$include Ingredients.csv
$offdelim
display ing;

The content of the cvs file is in the following structure:

dummy,material,descr
1,001111,cosmone01
2,001112,cosmone02
3,001113,cosmone03
4,001114,cosmone04
5,001115,cosmone05
6,001116,cosmone06
7,001117,cosmone07
8,001118,cosmone08

42,001152,cosmone42

thank you, best regards
Hugo


\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/zFt-z_eKHXwJ.
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.

Hugo
To use a cvs file I suggest you to use a sql2gms feature and setup your csv file using a ODBC connection in Windows. You can find an example in “Gams Data Utilities” #059.
Regards

2012/7/12 Hugo Caçote

Hello,

I have defined in my model the following table which I then try to fill with data coming from a CVS file called Ingredients.csv.

But I get the following error message (Real number expected). Cant I use text data in my table?

— .Ingredients.csv(2) 3 Mb 1 Error
*** Error 1 in \GVECSM0001DATA.ds.givaudan.com\homedir$\cacoteh\Desktop\GamsReporting\Ingredients.csv
Real number expected
— .Ingredients.csv(3) 3 Mb 2 Errors
*** Error 1 in \GVECSM0001DATA.ds.givaudan.com\homedir$\cacoteh\Desktop\GamsReporting\Ingredients.csv


-----------model--------------------
sets

j “product numbers” /1*42/
z “information” / material , descr / ;

table ing(j, z) “ingredients”
$ondelim
$include Ingredients.csv
$offdelim
display ing;

The content of the cvs file is in the following structure:

dummy,material,descr
1,001111,cosmone01
2,001112,cosmone02
3,001113,cosmone03
4,001114,cosmone04
5,001115,cosmone05
6,001116,cosmone06
7,001117,cosmone07
8,001118,cosmone08

42,001152,cosmone42

thank you, best regards
Hugo


\

To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/zFt-z_eKHXwJ.
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.



\

Edson Valle
edsoncv@gmail.com


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.