# Read the Rows in Data Table and wants to print the value 1 in another table which is equal to Rows.count.ToString

Solve the Question
i had Read the Rows in Data Table and I wants print the value 1 in another table which is equal to Rows.count.ToString o how it will be done ?

can you elaborate the “I wants print the value 1” for me to try to give a solution.

i wants the Solution as me having 2 Excel Files
One excel file using dtable.Rows.Count.ToString Output = 900
and another excel file I wanrts to write 1 in each row which will be equal to 900
as every time (dtable.Rows.Count.ToString) count changes its value.

@Shubham4323

Please correct me if I’m wrong.

First you will count no. Of rows in one Excel file. And then you want to compare that value with one of the row in another Excel file. If it is equal then you want to write ‘1’ in another column of the same row. This is what you are trying ?

@Lakshman
no compare just print the values of 1 in another excel file which will be equal to the number of rows in First Data table.

@Shubham4323

Could you please give some example for better understanding.

@Lakshman
2 excel file AB and BA
AB had Data Table name abcd abcd.rows.Count.toString as output is 50 and it will change time to time.
and wants 50 times 1 in each row in one column accordingly abcd.rows.count.toString.

@Shubham4323

Got it now.

1. Take one Excel Application Scope activity.
2. In assign, int i = 2
3. Take While loop activity and check condition like: i <=abcd.rows.count + 1
- Take Write Cell activity and pass below one:
SheetName: sheetname
Range: “C”+i.Tostring
Value: “1”
- In assign, i = i + 1
End loop
1 Like

@Lakshman
But it works to slowly.