Excel Iteration

#1

While Iterating the Excel Sheet Row I have selected the Row position ‘Next’ and keep this event inside While loop. But still in every iteration it selects the first(i.e next row of initially selected row) in every iteration.
so how do I move or iterate row by row.

#2

Hi Jain_rohit_ghrc,

if you are reading Excel file from data store then below mentioned code will work fine

  1. First put Excel file name with in tag “var- def " and mention a name to the name attribute of " var-def” tag, then follow below mentioned code.

   <var-def name="datastoreColumns">
         mentione here all coloumn names like ( invoice_id,item,quantity,price,description) 
   </var-def>
   <loop item="datastoreRow">
          <list>
                 <datastore name="${data_store_name}">
                        select * from @this ;
                 </datastore>
          </list>
          <body>
                 <script><![CDATA[
      		String[] outputColumns = org.apache.commons.lang.StringUtils.split(datastoreColumns.toString(), ",");
            Map productDetails = new LinkedHashMap()
            
            for (String column : outputColumns) {
           		 productDetails.put(column, datastoreRow.get(column).toString());
         	}               
            
        ]]></script>
          </body>
   </loop>
#3

If you are using RPA Express Excel Actions, here is the option.


But the loop ending logic you have to have.

#4

I don’t think these steps will help me to iterate Excel by row? Is it?
Have to manually switch to the next row of Excel right?

#5

No, it automatically does …Excel-Multiple Rows.zip (99.8 KB)

use the attached project

you need to change the excel location that… it…

#6

I think it needs lot of preconditions, does it work till the end of file?
doesn’t matter the number of rows?
U have use Mouse Clicked which I use to avoid generally.
not able to match preconditions

split this topic #7

A post was merged into an existing topic: Loop thru Multiple Excel Rows using RPA Express

closed #8
archived #9