Read range activity sheet name with current date timestamp

Need expression for active sheet to read range activity of logs file. I have file name generated during execution as per date time stamp and sheet name also saving with date timestamp… I would like to read sheet to do som if condition…
here is my excel sheet looklike
“ExecutionLogs_” + Now.ToString(“yyyyMMdd_HHmmss”)"

Hi @r0818

Remove the " at the end. Try this

"ExecutionLogs_" + Now.ToString("yyyyMMdd_HHmmss")

Hi @r0818,

You can use Get workbook sheet activity (classic), which gives all sheets in the excel.

Then you can use belew expression to get the required sheet.

(from s in wbSheets where s.startswith(“ExecutionLogs”) Select s)(0)

where wbSheets is the output of Get workbook sheets activity.

1 Like

Hey @r0818

Please delete that " at the end and check once.


yes, its compiled. thanks

Thank you, I need to read range from excel and for each row in column “Status” if any fail find , send email 1 or email 2 if all pass.
Can you please help me with the expression in for each to send mail on conditional basis…

Hi @r0818 ,

For each row in datatable activity is not required, you can remove that.

Instead you can use filter datatable activity, with condition Status = “fail”.

then If activity with following condition:

dt_Filtered.rows.count > 0

( where dt_Filtered is output of Filter datatable activity)

Then : Send failed mail

Else : Success mail

Hope it helps.