If "1" then use these rows

Trying to make option that if value is “1” then only uses row 1 from excel if 2 then use rows 1 and 2 and so on.

I don’t understand your ask!

Hello.
Have you looked at the “If” node? There should be a lot of posts on how to use it here on this forum. Try searching for it. If you still need help, please post a picture of your script so we can see where you are and what you need to fix.

1 Like

You could also give ‘‘getitematindex’’ a try :slight_smile:

2 Likes

you could try Range function in Python to get all the indexes in a list and use that in get item at index node.

range(1,x) =[1,2,3…x]

Actually :
range(1,x) = [1,2,3,..,x-1]

Don’t know how your graph looks like (we lack some information here), but an idea would be to use the List.TakeItems node, and then play with the number of items you take (amount = 1 → Outpout = first item ; amount = 2 → Output = first two items, etc.).

1 Like

ooops. thanks for correction!!

1 Like

revit%20Screen%20shot
So if only one is needed I only want info from row 2 on excel. If two are needed then want rows 1 and 2 and so on.

In example two are shown

Use this with List.GetItemAtIndex

2 Likes

Like i proposed in post 3 :wink:

2 Likes