question

Remi A2 avatar image
0 Likes"
Remi A2 asked Remi A2 commented

How can I import an excel table into my table: processor2 / labels / PullOrder ?

Hello,

I would like to know if it was possible to import an excel table on the processor2/array label(Pullorder) on my model.

Thanks in advance !


test1-fm (4)_autosave.fsm

FlexSim 21.2.2
excel import
5 |100000

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

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Remi A2 commented

You can't import it directly into an array label. You can however use a bundle label instead and import the values into that. Use the sampling tool in the Import/Export window (toolbox -> Connectivity -> Excel Import/Export) to select the respective label.

1635926421488.png

In this case, the first imported value of any column will be treated as the column header, regardless whether the "Use Column Header" option is checked or not.

The pull requirement would then have to change to either of the two following lines:

current.labels["PullOrder"].as(Table)[Math.fmod(current.cnt-1, 9)+1][1]
or
getbundlevalue(current.labels["PullOrder"], Math.fmod(current.cnt-1, 9), 0)

If you have multiple processors it might be easier to simply import the values for each one into a column of a global table and read it from there in the pull requirement. This way you only have to set up one import instead of however many processors are in the model.

Table("TableName")[Math.fmod(current.cnt-1, 9)+1][insert_processorColumnNumber]

test1-fm-4-autosave_1.fsm

Mappe1.xlsx


1635926421488.png (24.9 KiB)
mappe1.xlsx (8.6 KiB)
· 4
5 |100000

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

Remi A2 avatar image Remi A2 commented ·

It's perfect, thank you for this very clear answer!

0 Likes 0 ·
Remi A2 avatar image Remi A2 commented ·

Sorry to bother you again but I tried with the: Table ("TableName") [Math.fmod (current.cnt-1, 9) +1] [insert_processorColumnNumber]

because i have multiple processor, but it doesn't work, could you show me how?

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Remi A2 commented ·

test1-fm-4-autosave-2.fsm

This model imports the first two columns from the excel file into the global table "PullOrder" and uses it to determine the pull requirement.

1635935335855.png

1635935378209.png

1 Like 1 ·
Remi A2 avatar image Remi A2 Felix Möhlmann commented ·
Perfect, thanks again !
0 Likes 0 ·