User Tools

Site Tools


interfaces:importing_only_certain_columns_from_a_spreadsheet_into_gams

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
interfaces:importing_only_certain_columns_from_a_spreadsheet_into_gams [2007/11/08 14:12]
Franz Nelissen
interfaces:importing_only_certain_columns_from_a_spreadsheet_into_gams [2020/05/29 15:44] (current)
Lutz Westermann mention ignoreColumns/ignoreRows and link to documentation
Line 26: Line 26:
 ... ...
 </​code>​ </​code>​
-Now we have all data available within GAMS and can easily continue from here. In most cases this approach is faster and less error-prone than using several ''​gdxxrw''​ statements to import data.+Now we have all data available within GAMS and can easily continue from here. In most cases this approach is faster and less error-prone than using several ''​gdxxrw''​ statements to import data. However, if it is just about skipping certain rows or columns, the GDXXRW options [[https://​www.gams.com/​latest/​docs/​T_GDXXRW.html#​GDXXRW_SYMBOLS_IGNORERC|ignoreRows / ignoreColumns]] can be used. To ignore the column with the header ''​V''​ (Excel column ''​M''​) in the example from above just change the gdxxrw call to 
 + 
 +<​code>​ 
 +$call"​=gdxxrw i=testdaten_GAMS.xls o=data.gdx par=A rng=Tabelle1!a2 ignoreColumns=M"​ 
 +</​code>​ 
  
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY interfaces/importing_only_certain_columns_from_a_spreadsheet_into_gams.txt · Last modified: 2020/05/29 15:44 by Lutz Westermann