Finding all available row and set border to them

Hello guys,

I already try using send hot key. But it is not consistently give good result.

Any idea/alternative how to do it?

1 Like


Install Balareva Excel package and then use Set Boarder activity to set the boarders to excel rows.

1 Like

Set border activity by balareva excel package need to specify cell range.

It is not suitable for my situation because my total available row is random.

This is because for monthly report. It depend on available data for that months

1 Like


Hope you know the First and last column of the input excel sheet. If yes then follow below steps to find the last row number.

  1. Use Read Range activity to read the data from Excel file and it will give output as DataTable. Let’s say dtInput.

  2. And then use below expression to find the last row.

        Int rowCount = dtInput.Rows.Count
  3. Finally use Set Border activity and pass the range as below.


Note: you can replace the L with last column value as per your input file.

Hey @anon54733438,

  1. I think a custom code should help using the Microsoft Interop library

  2. Prepare a VBA code and invoke in the intended excel


Thanks Bro.

Your step works but need some improvements.

Int rowCount = dtInput.Rows.Count + 1

+1 to include header or it will not set border to the last row


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.