How to get the last row and last column of an Excel book.(Power Automate Desktop)
Introduce how to get the last row and column where a value exists in an Excel book.

Contents
Flow creation steps
Set up an Excel Launch Action.
Parameter | Value |
---|---|
Launch Excel | and open the following document |
Document path | The path of the Excel book for which you want to examine the last row and last column. |
Make instance visible | OFF |

Set up an Set active Excel worksheet Action and specify the sheet to search for the last row and column.

Set up an Get first free column/row from Excel worksheet Action.
In the Variables produced by this action, The first empty row and column are stored in the %FirstFreeColumn% and %FirstFreeRow% Variables produced by this action.
If this number is set to -1, it will be the last row/column.
The last row may not be the last row if it is hidden by an Excel filter. The target filter must be deactivated.


---
Discussion
New Comments
No comments yet. Be the first one!