how to export values directly into excel when the model is running?

how to export values directly into excel when the model is running?

aravind_d
Not applicable
570 Views
3 Replies
Message 1 of 4

how to export values directly into excel when the model is running?

aravind_d
Not applicable

[ FlexSim 19.2.4 ]

Hi, @phil.bobo @steven.hamoen @tanner.p @Matthew Gillespie

I have uploaded sample model in which i am recording the no.of items and its entry time in global table.

I want to write values directly into excel sheet when the model is running. The values must store in excel sheet instead of global table and must update automatically and simultaneously when the model is running as it does in global table.

I tired to use excel commands but i am not getting the desired output. how to use the commands properly can anyone help me with a tutorial

Thank you in advance

asd-15.fsm

0 Likes
Accepted solutions (1)
571 Views
3 Replies
Replies (3)
Message 2 of 4

JordanLJohnson
Autodesk
Autodesk
Accepted solution

You might try saving the file every time you change a value. However, even if that works (which I am not sure it does), it will be slow, since you will save the entire file to change a single value.

This feels like a bigger question, though. Why do you need the values live in excel? How do you plan to use this live view? If we understand how you want to use this in a workflow, we can help you come up with a solution.

.


Jordan Johnson
Principal Software Engineer
>

Message 3 of 4

aravind_d
Not applicable

Hi, @jordan.johnson

My client expects the data to reflect in his database ( MongoDB) while the model is running. I tried using the db codes to export or import directly to database. The codes work perfectly for SQL server or MYSQL database but not for MongoDB. I have imported the values from MongoDb but i couldn’t export it to MongoDb database. So instead of showing in MongoDB i am trying to get the values in Excel.
It would be helpful if you could guide me in populating the values directly in MongoDB.This is the code i used for sample data whenever the object enters in sink the values will be stored in database

db-code.png

0 Likes
Message 4 of 4

JordanLJohnson
Autodesk
Autodesk

It sounds like you have a workflow that looks something like this:

24417-mongoworkflow.png

The question is, what is that output layer? FlexSim doesn't natively connect to NoSQL databases, including MongoDB, so you'll need an output layer to write the data to. The issue with using Excel for that layer is that Excel is file-based, and files cannot be read and written at the same time. I recommend using an intermediate SQL database, like MySQL or postgres. Then the MongoDB can read from that database while the model is writing to it.

.


Jordan Johnson
Principal Software Engineer
>