Get the item index from excel of a string to dynamo

Hi all,

I am trying to get the index of a string from excel to dynamo. For example, I want to get the index of the column and row from the string “banana” . I want to be able to get the index (column B and row 3 in this case). Then from this index, I will add from Dynamo the data from the Quantity row to excel.


My idea is something similar to the following script:

indexexcel.dyn (21.2 KB) INDEX.xlsx (8.1 KB)

Thanks for yout help

Please provide an image that has the node titles visible when enlarged.

Here we go:

Try to use the String.IndexOf node. The node you have will get the item in the list at the specific index (integer). The IndexOf node will get the index in the list of the string supplied.

Thanks foir the response. I have put the node. How can I input the list to the node? The scropt inputs is for strings, not for list.

I think IndexOf would work better in this situation. You could get the index within each sublist and then check which sublists contained the string.

Neither is working

You’ll need to use List Levels to check each sublist. You’re also missing an input for String.IndexOf.

Even if I put an input the output of the index is -1. What are the nodes to use list levels?

-1 in this case means the item doesn’t exits. List Levels are built into most nodes and give you greater control over how functions recognize inputs. Look it up in the Dynamo Primer. There are many essentials in the Primer that you’ll need to understand in order to get the most out of Dynamo and your graphs.