question

Mischa Spelt avatar image
0 Likes"
Mischa Spelt asked Matthew Gillespie answered

Excel Import data distinction mode?

According to the user manual, the Data Distinction mode of the Excel Multi-Table Import works as follows:

Per Column- For all the cells in a given column, the Excel Importer gets the value in the first non-header row (the beginning of the column), which must be a number. Depending on that value, the Excel Importer will use excelreadnum()or excelreadstr()to extract the data in that column. The cell containing this value is excluded from the final table in FlexSim.

I have two questions about this:

  1. Is it just my memory failing or did this functionality work differently before? I thought that this would look at the data type of the top data row (i.e. ignoring header rows) and assume that for the whole column, but now it uses the first row only to determine the type and does not consider it as data -- has this changed?
  2. What are the possible values here? The manual says "Depending on that value" -- does that mean 0 for numbers and 1 for strings? Or should this be a valid DATATYPE_.... or VAR_TYPE_... constant?
FlexSim 19.1.0
excel importdata type
5 |100000

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

1 Answer

Matthew Gillespie avatar image
0 Likes"
Matthew Gillespie answered

1. No, it's always worked this way. Only the Automatic and Values Only modes try to figure out what the datatype is for you.

2. You need to scroll down a bit more to see the list. Where it says "For the Per Column and Per Row modes... . The Excel Importer recognizes four possible values: "

For the Per Column and Per Row modes, the Excel Importer reads the first value in a row or column and uses that value to determine how to extract the remaining values in that row or column. The Excel Importer recognizes four possible values:

  1. Numeric Data- The Excel Importer will extract the data in this row/column usingexcelreadnum()
  2. Text Data- The Excel Importer will extract the data in this row/column usingexcelreadstr()
  3. Flexscript Data- The Excel Importer will extract the data in this row/column usingexcelreadstr(). If importing into a table, the Excel Importer will toggle this cell's node as FlexScript.
  4. C++ Data- The Excel Importer will extract the data in this row/column usingexcelreadstr(). If importing into a table, the Excel Importer will toggle this cell's node as C++. If this occurs, you will be prompted to compile the model after the import is complete.
5 |100000

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