Write on excel cell by looping


Hello Team,

How do I write on excel file . I have to update the status of each transaction.



If you want update Excel file each time you can use Append Range Activity.


Hi @DebottamRoy1,
Try using SQL Query Method.

  1. Connect Activity: To connect the excel file as a data source
  2. Execute Non Query: To update the field
    Note: You can write UPDATE Query (Same like SQL Queries) to update the cell using a WHERE condition
    You can keep the Execute Non Query activity inside the loop.



excel Cell Looping.xaml (11.3 KB)

Try This…
This is Based on Excel Cell Looping by using Write cell Activity



Do you want to write a new line/row on each transaction or just change information in a cell on every transaction?



Can you provide a simple XAML package with Worksheet as the data source to query in SQL. It will be useful for better understanding.


Hi @ranjith,
Please find the sample xaml attached.
dbconnect.xaml (10.4 KB)


Thanks :slight_smile:


How do I check result of this and how to implement this on my project


No I don’t want to update each time, My purpose is once loop enter first transaction and once transaction done it will update the next column is transaction done.


Any suggestion ??


Once loop enter first transaction and once transaction done
It means it is iterating inside the loop and after completing one transaction, you have to update the cell just inside the body block of your for each row activity right after your transaction…
The number of iterations= the number of updations.
You are using For Each Row- It means it will perform the specific tasks for each of the items inside that loop.
Hope you understood.



I don’t have execute non query selector



Any Idea