ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
Excel: unknown number of entries
Hi,
I use the experimenter (EndOfReplication) to put all the simulation results in an Excel sheet (from an earlier generated GlobalTable). Here an example for data each FlowItem carries in its labels. Code:
//Experimenter EndOfReplication: excellaunch(C:/Program Files/...); excelopen(concat(modeldir(),"RESULTS.xlsx")); excelsetsheet(concat("ItemReplication",numtostring(replication))); excelexporttable("GlobalTableFlowItemInformation",1,1,gettablerows("GlobalTableFlowItemInformation"),gettablecols("GlobalTableFlowItemInformation")); excelclose(1); excelquit(); Column calculations such as sums are easy: to sum up a column with an unknown number of rows, one can use =SUM(X:X) for column X. My question is, how to do row calculations for each row/FlowItem (e.g. staytime = time2 - time1). The "staytime" column then can be used for calculations (e.g. =AVERAGE(X:X), with X the staytime column). One "heavy" solution is to fill the entire column (by copying one cell, selecting the column, and pasting) with the function =IF(NOT(A1="");B1-A1;""). Does somebody have a "lighter" solution? Thanks Last edited by Stefan Trabut; 04-21-2011 at 08:33 AM. |
#2
|
|||
|
|||
Double-click on the cross
It looks like it is possible to fill two rows which contain numbers that Flexsim could have exported, then to double-click on the cross (right-down corner of the cell with the =B1-A1 code) to expand the code to the entire data (both rows). Then, if no row is left with blank cells, and the rows are filled one by one in the descending order, the code expands automaticly to the freshly created rows.
This doesn't work always - I don't know why. |
Thread | Thread Starter | Forum | Replies | Last Post |
Unknown setup time of a processor | Stefan Trabut | Q&A | 3 | 04-02-2011 07:22 AM |
Unknown error | David Chan | Container Terminal (CT) Library | 1 | 11-22-2010 12:58 PM |
how to get number of itemtype | Vic Li | Q&A | 11 | 08-19-2009 11:20 PM |
Excel 2002 vs. Excel 2007 | Nico Zahn | Q&A | 2 | 04-27-2009 01:47 AM |
Setting the number of operators | Sung Kim | Q&A | 4 | 02-05-2008 12:31 PM |