Hi all ! I’m trying to create a few lines of gams code that can be copied-pasted around in order to accomplish automatic unloading to an excel file. I use this:
EXECUTE_UNLOAD ‘v13c.gdx’;
execute ‘xlstalk -C v13c.xlsx’
execute ‘gdx2xls v13c.gdx v13c.xlsx’;
execute ‘xlstalk -O v13c.xlsx’
My next step is to change the strings detailing the file name from a fixed value to an automatic value, that appends the current .gms file name. Using & as concatenation and an invented global %filename% pseudo-code would be:
EXECUTE_UNLOAD %filename%&‘.gdx’;
execute ‘xlstalk -C %filename%&’.xlsx’
execute ‘gdx2xls %filename%&’.gdx’ %filename%&‘.xlsx’;
execute ‘xlstalk -O %filename%&’.xlsx’
Key Question: Is there a way to access the current file filename ? (since I can handle concatenation with puts)
Thanks in advance and sorry if the answer lies in plain sight but I wasn’t able to find it.
Regards!
Claudio
\
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.