Sunday, May 25, 2008

Importing large CSV files into GAMS

The tool SQL2GMS can be used to import large CSV files into GAMS. This is especially useful if the CSV file does not fit in Excel. Excel before Office 2007 could only handle up to 65,536 rows (in Office 2007 this is increased to 1,048,576). Examples:

2 comments:

  1. Hello
    Thank you for this site it's very useful. I want to ask you how to import a csv multidimensional table example data(loc,time,loc,time) (time and loc are alias) if it is a sparse matrix.
    I have a sparse matrix (420row and 420 column (84 location for 5 years rows and column) and don’t fit a excel file so I introduced as a CSV (comma separate) file. However I don't know how to write sets in the CSV file, I put the 2 column sets separated by a comma but I don’t know how to write the row sets and where to put the "dummy".
    Thank you very much

    Ben Arfa Nejla
    n.benarfa@group-esa.com

    ReplyDelete
  2. The best place to get free GAMS support is support@gams.com.

    ReplyDelete