question

Jason Merschat avatar image
0 Likes"
Jason Merschat asked Jeanette F commented

Exporting or ODC ItemList to Excel

Is there an easy way to write or export data from an ItemList to Excel? I don't see it working using the Export to Excel tool.

FlexSim 25.0.2
export dataodc
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Jason Merschat, was Jeanette F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jeanette F avatar image
0 Likes"
Jeanette F answered

Hello @Jason Merschat,

You can export tables to excel, so if you query the list and clone it to a table then you can export that table.


string directory = modeldir();
string filename = filebrowse("TestBook1.xls","Excel Files",directory);
excelopen(filename);
excelsetsheet("Sheet1");
Table Result = Table.query("SELECT * FROM ItemList1");
Result.cloneTo(Table("GlobalTable1"));
excelexporttable("GlobalTable1",1,1,10,2);
excelclose(1);

Export list as table.fsm


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.