Hello - I'm creating a script to export a bunch of vars/params to Excel/CSV. It needs be pretty clean/standardized so it can be read into a UI.
write AllVariables to file export_file;
But the output was too messy.
- Is there a way to silence Basic/NonBasic?
- My output is often Nodes x Time, which AIMMS seems to prefer as (n,t), but then it shows Time as columns instead of rows (which is SUPER ugly in the text file). So I have to duplicate everything as parameters with (t,n) for the export. Or am I wrong?
So now I'm looking at using AXLL, but it's pretty tedious.
This is what I'm currently doing:
axll::WriteTable(Var1, "A2:A5", "B1:AZ1", "", 1, 1);
axll::WriteTable(Var2, "A2:A5", "B1:AZ1", "", 1, 1);
… ad nauseam
There has to be a better way. Is there something like:
for i in MySet do
axll::WriteTable(i, “A2:A5”, “B1:AZ1”, "”, 1, 1);
I want to print one variable per tab in Excel - I plan on formatting all vars/params so they'll play nicely with WriteTable, then put them in a Set.
Is this possible or is there a better way?
Best answer by gabiservidoneView original
I don’t see why your for idea wouldn’t work.
You can also use axll:WriteCompositeTable instead of axll::WriteTable if you don’t require specifics cells for the contents.
@Noob9000, hope that worked, but I also wanted to share another library that you can use to export Excel, it is called DEX https://documentation.aimms.com/dataexchange/index.html!