question

Carmen F avatar image
0 Likes"
Carmen F asked Ryan Clark commented

Is it possible to setup arrays in a global table from Excel?

Hello,

I want to setup arrays in a Global Table from an Excel file. Is it possible? I don’t know if it will be the right method but I’m trying to do it by using the Excel import tool in Flexsim directly. Cells in the Global Table has being assigned as Array data but the problem is that I don’t know how values of each array must be written in Excel to being imported in the cell as an array. I only got to import values as strings.

if this is not the appropriate method, what would be the best way?

Thanks in advanced.

Regards.

FlexSim 21.0.2
global tableflexsim 21.0.2data importarrays
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

·
Roi Sánchez avatar image
3 Likes"
Roi Sánchez answered Ryan Clark commented

Hello @Carmen F, I guess you cannot import arrays natively from Excel.

Despite this, you could import these Arrays from Excel as strings and then run some code in the Post Import Code section of the Excel Importer to convert them automatically to Arrays. I attach you a model with this code that it will work as long as your strings have this format:

{value,value,...}

support-array from Excel.fsm


· 3
5 |100000

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

Carmen F avatar image Carmen F commented ·

Thank you for your help Roi, it has run perfectly!!

0 Likes 0 ·
Dylan W2 avatar image Dylan W2 commented ·

Hey Roi,


The answer helped me alot so far, I have a question to ask though. Is there a way to import strings into this? I tried some methodes and get stuck over and over again. The array I wanna import looks like this {ABC, 1,5,0}, The output I get is {0,1,5,0}.

Thanks in advanced.

Regards.

0 Likes 0 ·
Ryan Clark avatar image Ryan Clark Dylan W2 commented ·

Hi @Dylan W2,

Could you please ask this question as a separate post?

Please see Best practices for using this Answers site - FlexSim Community for more details. Thanks!

0 Likes 0 ·

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.