How to declare "DataTable.Rows.Count.ToString"

Can you please share your workflow? I don’t know how to use this in Assign Activity

Assign int Rc = Datatable.Rows.Count

just use Datatable.Rows.count.

Assign activity Variable(int32) = Datatable.Rows.count

Message box or writeline - Variable.tostring

Sorry, but image1 I’m getting this error.

I think DataTable variable name is wrong

am I missing something?

@mmmmamia check whether name given in output property of read range and used in assign activity are same or not.

Pass the datatable variable name which is in read range

could you give me workflow sample please. I already checked all Data names

@mmmmamia can u share ur workflow, i will check the workflow.

check the screenshot, assign countvalue to a generic variable or Int variable.

In the assign activity Instead of Datatable pass CountSummaryRow

works now! Thank you very much all!

Hey @mmmmamia

Use this workflow
TestWordActivity.xaml (5.0 KB)


Hi @mmmmamia

Here is an detailed article on it :slight_smile:
# How To Count Rows In DataTable – In UiPath