Datatable.rows.count is not returning anything

Hello All,

I am trying to fetch the row count in an excel file. I have attached the workflow and the excel file as well for your reference. Kindly advise what shall be the issue.

I Would also like to inform you that it has got stuck in the file for hours together but not returning anything

It would be highly appreciable if you provide your inputs ASAP.

TestSequence.xaml (8.5 KB) 02 Bonus res Retail 07-2019 Jacob.xlsx (2.9 MB)

Regards,
Ashok.

Hi @vankashok

In order to get the rows, you would need to use a Read Range activity.

Hi
Hope these steps could help you resolve this
— use excel application scope activity and pass the file path as input
—use a read range activity and get the output with a variable of type datatable named outdt
And make sure that the property Add Header is enabled so that the first row is taken as header
— now use a writeline activity like this
Outdt.Rows.Count.ToString

Where Outdt has a method called Rows and Count is a method of Rows which gives us the number of rows in the datatable

Simple isn’t it
Hope this would help you
Kindly try this and let know for any queries or clarification
Cheers @vankashok

2 Likes

Hi @nlee1131

I have used Read range activity. But the issue is, it is not returning anything, in fact it has got stuck there for hours.

Ashok

@Palaniyappan

Thank you, will update you soon.

Cheers,
Ashok. :slight_smile:

1 Like

Sure
Kindly let know for any queries or clarification
Cheers @vankashok