Excel 7 (and later) has limit of 1,048,576 rows (before version 7 this limit was 65,536 rows). When using COM automation (using Excel from a program) one usually turns off DisplayAlerts to prevent popping up messages related to saving workbooks etc. However this also means that a large CSV file will be silently truncated by the GAMS utility GDXXRW:
3000000 3000000 25888896 x.csv
C:\projects\tmp>gdxxrw i=x.csv o=x.gdx set=x rng=a1 rdim=1 cdim=0
GDXXRW Dec 18, 2012 24.0.1 WIN 37366.37409 VS8 x86/MS Windows
Input file : C:\projects\tmp\x.csv
Output file: C:\projects\tmp\x.gdx
Total time = 7847 Ms
C:\projects\tmp>gdxdump x.gdx > x.gms
Set x(*) /
We can read unlimited size CSV files using SQL2GMS (see for instance http://yetanothermathprogrammingconsultant.blogspot.com/2010/04/gamsgdx-compression.html).
I talked with the GAMS people about this. The proposed fix for the next release: check if row 108576 is not empty. If that is the case issue a warning message.