How to export the code result in excel file?

How to export the code result in excel file?

aseem_s
Not applicable
26 Views
3 Replies
Message 1 of 4

How to export the code result in excel file?

aseem_s
Not applicable

[ FlexSim 7.5.4 ]

/**Custom Code*/
treenode item = parnode(1);
treenode current = ownerobject(c);
int port = parval(2);
string s = numtostring(getitemtype(item));
/*exittime1, entrytime1, die1 are global variables*/

if(stringcompare(s,die1))
{ 

	exittime1 = getentrytime(item);

}
	
else
{
	entrytime1 = getcreationtime(item);
	die1=s;
}<br>
0 Likes
Accepted solutions (1)
27 Views
3 Replies
Replies (3)
Message 2 of 4

jing_chen
Not applicable

Hi, Assem.

Have you ever try to use excel commands like: excelopen(), excelsetsheet(), excelwritenum()? You can find more detail in user manual about excel.

Message 3 of 4

aseem_s
Not applicable

Hi,

What would be better writing it in the global table then exporting or directly exporting to the excel as you are saying?

0 Likes
Message 4 of 4

jeff_nordgren
Not applicable
Accepted solution

@Aseem S,

Have you tried using the Excel Export option for a Global Table? If you select the global table, on the right of the screen in the Quick Properties window, you will notice a "Add Table to MTEE" button (see graphic). You can press that button to create the "basics" of a Global Table Excel export.

9768-global-table-export-1.png

Then you would to to the Excel Interface, top row of icons, and go to the Export tab (see graphic). Then just fill in any information that is needed and press the Apply button. Then you can select the table(s) to be exported by checking the box next to the name of the Export and pressing the Export Tables button below the tables list.

9769-global-table-export-2.png

Is this what your were looking for? Would this work for your situation?

Thanks.