Import Excel Values Only by code

Import Excel Values Only by code

nilP8GEZ
Advocate Advocate
181 Views
4 Replies
Message 1 of 5

Import Excel Values Only by code

nilP8GEZ
Advocate
Advocate

[ FlexSim 24.1.1 ]

Hello,


We are trying to import an Excel file that is located in a network location. The Excel interface returns an error because it does not expect paths that point to a network location and instead interprets it as a relative path.

However, we found that using excelopen we can open the file without problems. But now we want to read it as Values Only (to do it faster) and we don't know how to do that.

We have been testing with excelrangeread, which seems to not be working. It only works with 3 parameters and the table as a string, which is deprecated.

Category Command Reference (flexsim.com)


The example code returns a message that says there are too many parameters.

Even if it works, how can we read with values only?


Thank you in advance.

Accepted solutions (1)
182 Views
4 Replies
Replies (4)
Message 2 of 5

joerg_vogel_HsH
Mentor
Mentor

@Nil Ns, have you considered to assign a drive letter to a network path in your windows system?

0 Likes
Message 3 of 5

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

I tried my suggested approach and imported data from a network source, that I have assigned before a drive letter for. The import succeeded.

0 Likes
Message 4 of 5

joerg_vogel_HsH
Mentor
Mentor

You can assign a drive letter for a network source by net command on windows system command shell.

0 Likes
Message 5 of 5

pasichp
Not applicable

Hi Joerg, thanks for the solution - I've just tested it on my setup and it indeed works.
One thing I'm concerned about though is that in a scenario where the model is shared with clients, they all need to have the network location mapped to a drive letter, which can be a logistical challenge. Do you have any ideas for such scenario?

0 Likes