question

Aseem S avatar image
0 Likes"
Aseem S asked Jeff Nordgren answered

How to export the code result in excel file?

/**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>
FlexSim 7.5.4
tablesscheduling
· 2
5 |100000

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

jing.c avatar image jing.c commented ·

Hi, Assem.

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

1 Like 1 ·
Aseem S avatar image Aseem S jing.c commented ·

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 0 ·

1 Answer

Jeff Nordgren avatar image
1 Like"
Jeff Nordgren answered

@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.

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.

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

Thanks.


5 |100000

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