Excel write range :current date and time

I want to write current date and time in excel after bot run succesfully pls give me formula or exp for that

Datetime.Now.ToString would give you current date or
DateTime.Now.ToString(“yyyy/MM/dd HH:mm:ss”)


If we need to write current datatime as DateTime type in the sheet, can you try to use just Now with WriteCellX activity etc?

Sample20221208-5.zip (8.9 KB)


IT Will increase row ? after completed one status it can write for anotherone also na?


The above sample write date to specific cell (“B2”).
We can modify where to write it.


Like i want to write status and current date time so i can i give in a loop to write


It depends on your loginc.
If you use ForEachExcelRow activity, we can write it as the following, for example.

Or as another approach, we can also update datatable which is read by ReadRange, then wirte whole datatable to the sheet using WriteRange.


You could read it as datatable and simply use for each row in data table.To loop through each row and assign the value of status and current date.

Current time is giving error

What is the error then?

So what activity we can use write range or write cell?

end of expression expected

Write range workbook activity or write range if you use excel activity.

what range i should give? for status C2?

Write the entire data table in an excel sheet don’t need to mention any range in write range activity

how to get resolve this error

Remove .tostring and just give"completed"


Use read range workbook and get the excel data ads datatable .
Then use for each row in data table , assign the value to status and current date

You should pass data table variable inside the field not string

@Kuldeep_Pandey Use this method and Enable the auto-increment row checkbox in the write cell activity.