Skip to content

Writing Excel Data

Using this functionality user can write excel data in an iterative manner with the help of for loop.

Lets say we have a sample excel file as shown below in which we you want to enter data in an iterative manner.

This image has an empty alt attribute; its file name is read2-1.png

Assuming you want to enter some values in the count column and the expected output in the excel sheet will be something like below:

To achieve this please follow the steps below:

Step 1: Load the excel file using loadexcel function. 

In the above window, scroll down into parameter section & set the other variables. 

 

Step 2: Set a variable with sequence number to iterate one by one and to initialize the variable.

 

Step 3: Get the number of rows in the excel sheet which will be used in the for loop as the end index.

 

Step 4: Start for loop with startindex as 0 and end index as total number of rows in the excel sheet. Here it will be ${rowcount1}

 

Step 5: Set the sequence number variable again to be iterated inside for loop.

 

Step 6: Define a variable and use setcellvalue function to set the data in the excel sheet.

Here, data is being written in the count column of the excel sheet one by one starting from the first index. ${Count} refers to the current sequence number coming from the sequence number function as the input data and the next ${Count} refers to the index of the excel sheet that at which index this data will be entered.

Syntax for setcellvalue is Key=Input Value.Index

 

Step 7: This step will mark the end of for loop with ENDFOR statement.

 

So the complete test case will look as below:

      

 

To know more about the specific functions used in the above use case please refer to this link.

Link: https://huloop.ai/docs/beatblip-commands/

Back To Top