There are three ways you could do this:
1) There's an exporttable() command that allows you to export a node table (a Global Table or Label Table) to a CSV file. That CSV file can then be opened by Excel.
2) The second option is to use the excelmultitableexport() command. This does the same thing as pressing the Export Tables button on the Export tab of the Excel Interface. All tables that are checked will be exported when using this command. You can write some code to turn the tables on or off if you just need to export a subset of tables. Here's an example:
treenode excelAuto = model().find("Tools/ExcelAuto"); treenode exportTable = getvarnode(excelAuto, "exporttable"); exportTable.subnodes[1].find("Checked").value = 0; //Uncheck the first table exportTable.subnodes[2].find("Checked").value = 1; //Check the second table excelmultitableexport(); //Export the tables
3) The final option is to write a completely custom exporter. You can view a sample of this by going to the Custom tab of the Excel Interface and then under the Custom Export section, selecting the pick option Example Custom Export. Then view the code.
Hi @Matt Long, I'm using the second solution of yours i.e., excelemultitableexport() in custom code in process flow.
I'm getting excel file with global table data as per your solution if I'm running the model in normal way.
But if I'm running the model the model in experimenter mode the model is not fetching any data of Table to dedicated/allocated excel file.
Please let me know what to do when I'm running experimenter.
7 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved