Loading  set elements only if they have data or text

Top  Previous  Next

Suppose a spreadsheet contains a potential list of elements names and one only wishes those element names associated with nonzero data or yes such as the section below from gdxxrwss.xls.

 

_img88

 

One would read this with the statement Gdxxrwread.gms

 

$call "Gdxxrw gdxxrwss.xls set=i2 rng=sheet1!a5:d6 cdim=1 values=yn"

 

and the resultant i2 set will only have the elements boats and watercraft since the other two elements are associated with a blank or a no.