Reading zipped archive with csv2gdx
Posted: Fri Mar 03, 2017 6:53 am
I have a collection of csv files which have data in the first 11 columns (A -K). All files are identically formatted. I am interested in reading a 1-D parameter whose key (or index or identifier) sits in column 1 and value sits in column 11.
GAMS documentation for csv2gdx reads "Reading of a compressed input file with an optional password is supported." So, I zipped the csv files in question into a single zip archive and then tried the following:
$call csv2gdx myziparchive.zip output=test.gdx id=w Index=1 Values=(11) UseHeader=Y StoreZero = Y
It complains saying "Values(s) column number exceeds column count; Index = 11, ColCnt = 1". When I try the exact command above on a single csv file in the collection instead, it works beautifully. No change except for myziparchive.zip -> myfirstcsvfile.csv. What am I missing here? I simply cannot read in sequentially, too many files in collection.
GAMS documentation for csv2gdx reads "Reading of a compressed input file with an optional password is supported." So, I zipped the csv files in question into a single zip archive and then tried the following:
$call csv2gdx myziparchive.zip output=test.gdx id=w Index=1 Values=(11) UseHeader=Y StoreZero = Y
It complains saying "Values(s) column number exceeds column count; Index = 11, ColCnt = 1". When I try the exact command above on a single csv file in the collection instead, it works beautifully. No change except for myziparchive.zip -> myfirstcsvfile.csv. What am I missing here? I simply cannot read in sequentially, too many files in collection.