question

Nil Ns avatar image
2 Likes"
Nil Ns asked Przemyslaw Pasich commented

Import Excel Values Only by code

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.

FlexSim 24.1.1
excel importvalues only
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

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

0 Likes 0 ·

1 Answer

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Przemyslaw Pasich commented

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

· 2
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

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

0 Likes 0 ·
Przemyslaw Pasich avatar image Przemyslaw Pasich Joerg Vogel commented ·

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 0 ·