Does excelreadcell command work?

Does excelreadcell command work?

amerloQ2XZU
Advocate Advocate
1,197 Views
5 Replies
Message 1 of 6

Does excelreadcell command work?

amerloQ2XZU
Advocate
Advocate

[ FlexSim 18.0.3 ]

Hi,

today writing a procedure to import data from Excel file I discovered a new command excelreadcell. It is recognized by FlexSim, but not by the FlexScript parser. Is it an issue or can't be used?

Does similar command exist to write a variant in Excel file?

Thanks for the support.

11311-parser-error.png

Accepted solutions (1)
1,198 Views
5 Replies
Replies (5)
Message 2 of 6

jeff_nordgren
Not applicable

@Alessio Merlo,

Can you send us your model or a sample model that show the problem? Just looking at an error message does not tell us how the model functions. We need to see the model to see what is happening and when.

Also, did you open the Excel file using "excelopen" command? And then do an "excelsetsheet" command? The excelreadcell command does not open the Excel file by itself. My guess is that your Excel file is not getting opened, causing the error?

Thanks.

0 Likes
Message 3 of 6

amerloQ2XZU
Advocate
Advocate
0 Likes
Message 4 of 6

jeff_nordgren
Not applicable
@Alessio Merlo

I think the problem was that the Excel file was not being opened. Attached is your model (and the Excel file I used) with the added Excel commands that I used. Seems to work on my end. Does it work for you?

Thanks.

excelreadcell-jn1.fsm

orderschedule.xlsx

0 Likes
Message 5 of 6

amerloQ2XZU
Advocate
Advocate
@Jeff Nordgren

you don't use excelreadcell command, but excelreadnum. In this way it works!

The excelreadcell command doesn't work because the code isn't compiled correctly then you can't execute it (both with excel file and without excel file).

Probably it is a bug or there is an error in the code.

0 Likes
Message 6 of 6

philboboADSK
Autodesk
Autodesk
Accepted solution

For some reason, in the update to compiled FlexScript, excelreadcell() wasn't included in the list of FlexScript commands, so the parser doesn't recognized it.

I've fixed it for 18.0.4, which should be released tomorrow.



Phil BoBo
Sr. Manager, Software Development