Count columns

i want to start counting in column/row C4, beginning with 1, and stop at column/row CV4 (exactly 100).

Does anybody know how to do that? :grinning:

maybe with filter data table?

Hi @mcLauge - Using Excel Read Range from C4:CV4 stores into Datatable. Then you can get the count by Datatable.rows.count.


1 Like

Thanks AK,

do you know how i can write that into row 4?

because there are already some numbers written. But i kinda want to overwrite it, so that´s in the order from 1 to 100

You cane use Excel Write Range and provide the same Range from C4:CV4 and that Read Range Data Table variable here to write it in the Excel.


that is the result of all the columns counted.

But i want to start at C4 with number 1 and D4 to be 2, E4 to be 3 and so on.

hope u understand what i mean :sweat_smile:

that sequence is static? will u always start in C4 (Count: 1) and finish in 100 (Count: 100)?

I understood than u want to create a Count Index = 1, right?

If u use table.columns.count property you can get the total columns in your file than contains values and create a variable with that index. For example (I tried to replicate your document):

In excel you have this data.

As u can see, we have 8 columns with values (0-7).

In UiPath u can do next:

where Assign is:

CR = tablaTemporal.Columns.Count

tablaTemporal is my datatable with the information extracted form my Excel


And automatically you have your index.


I understood well?

Yes, I will always start in C4 with number 1 and end at 100 (in my case its cell CV4).

The target is, to remain in the same row (Row 4).

Hope u understand what I have to do

Thank you for your time and respond.

Kind regards,

Evelyn Hrab

Hello there,

I think I wrote it falsely in the forum.

I want to start writing in C4 my counter ( = 1) and end writing, when counter reaches 100 (in my case it would be cell CV4).

So I want to remain in the same row while writing these numbers.

These parameters (where to start and stop writing) are always given.

Hope u understand what I´m supposed to do and what my destination on this practice is.

Thank u for your time and response.

Kind regards,

Evelyn Hrab

1 Like

Hi! I have the solution for ur problem, u only need add a package named Uniquity in Manage Packages, and change variables names.



testCells.xaml (7.5 KB)