Looping through a list from excel

I am getting data from excel. I want to add a number to each member of the list that comes in. Then add the new data to a view name.

Pulling data in from excel is no proble. Changing the view name is no problem. But the data in excel can change. Sometimes it can be 5 items other times it can be 10 items. So I need to count the items in the list and loop through the list adding a nember to each item in the list. My thoughts are to use a while loop. I can’t get my head around the way a while loop works. Anybody know of any good examples for demonstrating a while loop. Get the count of items that have come in from Excel.

Is this the best approch to take.






Your intent isn’t clear. However, seems like you should be able to manage without loops.

Post the file you’re working on (or a screen shot)

Meanwhile see if this helps…


1 Like

Thanks Vikram. Loops are what I need. But I can’t get my head around how to use them. In traditional coding I am fine with loops. I’m looking for some clear tutorials or explained examples of loops.

Any links would be great




1 Like

Not up to date, but look for the chapter on Looping in the Design Script Guide

Also some earlier discussions on this forum regarding Imperative Code Blocks might be helpful.


Thanks Vikram. I didn’t realise it was in the design script guide. Some light reading for me for the weekend :slight_smile:

1 Like