How to write data in excel file without overwriting

Hi i am new to work with excel. Can you please suggest me how can i add specific number(SearchRequestNumber**(Marked Yellow)**) in the excel file row by row each time when the process runs without overwriting. In my case if request is not found then add to excel file and when the process runs again with new number and if also request not found then add the number to excel file and so on.


Excel File : QueueNumber.xlsx (8.5 KB)

i try append excel and add row data but its not working

1 Like

Hi @zeshanm9

you were almost done
its like updating the excel for each request found or not, with a value in a particular column…
Kindly correct me if i m wrong with understanding the query

Fine…
you can update the excel, with a column in each row and each cell like this

  1. use a write cell activity buddy with the sheet name and range be like
    “A”+Counter.ToString
    (i take as A column to be updated the value you have, you can change with the one want
  2. use a assign activity next to the writecell activity to increment the counter with +1
    counter = counter + 1
    where the counter is a integer variable of default value 0 declared in variable panel…
    so now the column will iterate through each cel buddy
    like this A1, A2, A3,…

Thats all buddy you are done
kindly try this and let know
Cheers @zeshanm9

1 Like

WriteExcel.zip (17.4 KB)
My workflow

@Palaniyappan yes it is updating the excel file for each request not found

thats great
did that work @zeshanm9

No its not working as it delete all the rows and columns from the excel sheet.
can you see my workflow attached above i am doing the same but maybe i am missing something.
can you do this for me in my workflow attached above
cheers

great @zeshanm9
is that if kept inside a for each loop .
because you told that the process will run again…is it repeating again with a for each loop…?

Cheers

No i didn’t keep inside for each loop. And the process will run again means it will run again each time with different number

Fine buddy,
how you are enabling it run AGAIN each tme with different number

you can try like this buddy “A” +Counter.ToString

Cheers

WriteExcel.zip (17.8 KB)
can you please see my updated workflow as i is writing the number in the 10th row leaving the above rows empty.asdasd


i am getting this error

Hi @Palaniyappan Now its working but this is inserting in the first row and replacing the first value

1 Like

Fine …Thats great
mention the counter default value with index of row where you want to start …cheers @zeshanm9

@Palaniyappan sorry i didn’t got you how to do that ?

in the one i gave you i kept the default value of 1 to counter so
for “A”+Counter.ToString = “A1”
thats why its writing A1 first and overwriting
you can mention the counter default value with any row number that you want to start initially and write in each cell next to it from there on with counter increment
Cheers @zeshanm9

Sorry @Palaniyappan Still i am not getting your point :frowning:
can you please do in my workflow or send me a screenshot

you were almost done
Fine in which column and in which row you want to start entering the value first…
like A1, A2,OR B1, B2,
Which one buddy
Cheers @zeshanm9

qqqqq
I want like this i want to start entering the first value in A2 (A1 we will leave as header) then A3, A4 and so on.

Ok @zeshanm9
then go to the variable panel and change the default value of counter as 2…
so that it will start from A2…
Cheers

ok but now it will start from A2 but still replacing the value
I want to not replace the value