I am working in one uiPath Project in which i am extracting data from excel sheet but in some cases excel sheet not contains any data in that case i want to print None for that particular date,so how can i achieve this please help?
Hi @arijeetsarkar2017 welcome to forum
Store excel file in datatable and use the code whether excel file is empty or not
Datatable variable.rows.count
If it is equal to zero , no data in Excel sheet
Hope it helps
Mark it as solution if u got it
Nived N
@arijeetsarkar2017 Welcome…
Read excel sheet using excel application scope activity
ExcelData is a variable with DataTable Variable type
Use assign activity and create an integer variable to count all the data of excel sheet →
Data =ExcelData.Rows.count
Then use if condition like this → Data<0
If condition satisfy then no the sheet is empty
If not that means sheet has some data
I hope this will help you
Regards,
Vrushali
yes thank you for ur help but if the sheet contains no data i want to print None message in a email body for a particular date.
Data<0 , it implies that sheet is empty
Then in the then section , put a mail message activitiy, with body as “None”
Hope it helps
Mark it as solution if you got it
Nived N
Happy Automation
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.