Row count on Report, Excel Format

I trying to print a row number on report output(pdf),
the report template is in Excel and I have tried a lot of formula but nothing has worked.
the formula in using in the cell is =IF(B20<>"",COUNTA($B$20:B20),"")
Has anyone got row number working?
I want out put to be :
Row Number Name
1 Sam
2 John

Formulas are mostly used for sub-totals calculation. Your case seems not to be supported. If you need row numbers you can use Groovy Dataset for your report and set row number values explicitly.