question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Ankur A3 commented

Importing time distribution data from Excel?

Hi Team,

I am having service time distribution data (poisson(5)) in global table with flexscript format. I want to link it with excel import. But while importing same data from excel in global table, it's getting converted into string format due to which distribution is not working.

How can I resolve this issue?

Thank you!

FlexSim 21.0.10
global tableexceldatadistribution
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 Ankur A3 commented

Data imported from excel is only interpreted as either a number or a string. Either change the respective column back manually.

1655895125543.png

Or toggle the cells as FlexScript with the following code (for example as part of the 'Post Import Code').

Table table = Table("tableName");
int scriptColumn = 1;

// Toggle cells in 'scriptColumn' as FlexScript
for(int row = 1; row <= table.numRows; row++)
{
    treenode cell = table.cell(row, scriptColumn);
    switch_flexscript(cell, 1);
    buildnodeflexscript(cell);
}

1655895125543.png (25.7 KiB)
· 1
5 |100000

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

Ankur A3 avatar image Ankur A3 commented ·
Hi @Felix Möhlmann,

Thanks for you answer!

I have gotten 1 more way to do it. It is using executestring(GlobalTableCell).

1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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