question

William Proctor avatar image
0 Likes"
William Proctor asked William Proctor answered

Linking Excel Data Dynamically to Flexsim

I would like to allow a user to enter a part number in Excel and then have a running Flexsim model use the information to run an analysis and then have Flexsim transfer a table of results back to the spreadsheet. I see that I can link to an Excel spreadsheet using the "excel...." command which works great. I have an issue, however, updating the Excel spreadsheet once it is linked to Flexsim. Do I need to use a "go-between" file? Thanks for your thoughts on how to do this.

FlexSim 21.0.2
flexsim 21.0.2excel interface
· 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.

Ben Wilson avatar image Ben Wilson ♦♦ commented ·

Hi @William Proctor,

I would like to allow a user to enter a part number in Excel and then have a running Flexsim model use the information

Are you trying to trigger some FlexSim behavior based on a change in an Excel cell, as if FlexSim could listen for changes in Excel?

I have an issue, however, updating the Excel spreadsheet once it is linked to Flexsim.

Once FlexSim reads an Excel cell's value, it could save that value to a variable in code, or to a treenode, etc. That data-read does not establish any connection between the data in Excel and the data stored in FlexSim's variable or treenode. In other words, once an Excel value is read, updating that value in Excel will not automatically transfer the new value to FlexSim. The Excel cell would need to be read again.

Or did I misunderstand this issue you described?

Thanks for your thoughts on how to do this.

If you want a change made to an Excel file to automatically propagate to your FlexSim model, I think you'll have to do one of the following:

  • Use some other interface besides Excel (like a custom webserver front end) for the user to input data.
  • Script some Excel macro that will listen for changes in Excel and then send socket, OPC, or other communication to FlexSim.
  • Have your FlexSim model poll Excel regularly to "listen" for changes to a particular cell. This is the least efficient, but potentially the easiest to set up. If you want your model to run at a good speed, this is not a very good option, due to the constant polling against Excel.

If I misunderstood the gist of your question, please elaborate more on what you'd like to do and we'll continue to explore options.

0 Likes 0 ·

1 Answer

·
William Proctor avatar image
0 Likes"
William Proctor answered

Thanks for everyone's input! I ended up creating a dashboard that allow the user to enter the part number which triggers a user command and updates a table in the dashboard. Then I created a webserver for the model so that the user(s) can access the model/dashboard remotely. It seems to work but I am still having issues with the dashboard graphics (3D rendering issue) that I need to work out.

5 |100000

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

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.