For retrieving the last row in the Excel sheet , You could maybe try using the Find First/Last Row Activity and get the row number. You could then use it in your Write Cell Fomula
If you are unable to access this activity, you could find this by enabling the Modern Design Experience and enabling the Modern Filter in Activities Panel.
Let us know if you still prefer using Classic Activities or unable to find this activity even after enabling the Modern Design.