How to write string in excel

I want to write string value in excel after some condition is true.

with using write range activity it ask for datatable but i want to write if condition is met then “Filed” otherwise “NotFiled”.

Write cell activity maybe better fits your case

Actually i want to write multiple rows

we can do it by looping as well
Otherwise, prepare the data table in a way that the updated range is addressed correctly

I’m using condition in loop when condition is true it will write the status in excel file

Hi @praveen5 ,

I think You can use

hope it help
Can you share input and expect output, I will code for you

As i put some condition to check element exists or not if it exists i want to write status in excel using write range activity it is working with write cell but i want to write multiple rows. So with write range activity it gives this error
" Excel Application Scope: Cannot write to the target range because it has hidden rows. Remove any filters or unhide rows and try again."


In write range it asking for a datatable but i want to write string value like Filed or not filed. so i add datatable

Please check where it is wrong

Hi @praveen5 ,
To write multi rows, you can use for loop and write cell with dynamic cell index

or you can assign value to data table,
after loop use write range

but to more clear, can you share me your file

there is a loop where every time a particular person account is login and check the condition and write status in excel . Is build data Table is correct?

I think there is no need for a data table. After you get each String value from the website, you can write each value into the excel file using write cell.

If you use a data table to store multiple string values, you need to add it to the other data table. The data table can have only 1 column,

I didn’t get a value from the website , i just check wheather condition is true and give my particular text like true or false in excel sheet .

if im using write range it only update status in that particular cell . i want that it should write next status in next row

Hi @praveen5 ,
Can you share your xaml file?
I think we can use for loop,
each loop write to a cell,
with dynamic row index

i m using for loop to get the userid and paswrd from the excel sheet and after login i want to check the status and then want to write the status in excel but it only write the same cell and update it.

Hi @praveen5 ,
Have you check index of cell to write

you can try my step

Hi @praveen5

If you want to write the data in a specific cell. You have to use the Write cell activity which used to write the data in a specific cell. The input of this activity is string.

But you are using the Write range activity which input is datatable only.

Simply use the write cell activity instead of write range

Hope it helps!!