PivotTable error

I have read all the forums on pivot table but I still do not understand how I can do it… I tried to implement the invoke code from Create Pivot table using UIPATH - #3 by sanjay21051990 but I have encountered this error

is there something wrong with this code?
Dim oPivotCache As Microsoft.Office.Interop.Excel.PivotCache=Nothing
Dim oPivotTables As Microsoft.Office.Interop.Excel.PivotTables=Nothing
Dim oPivotTable As Microsoft.Office.Interop.Excel.PivotTable=Nothing


Check this Create Pivot table using UIPATH - #3 by sanjay21051990

thank you but I already did! I have downloaded the project you attached and it runs perfectly but when I went to replace the location of my file, the range, and the row to follow my excel but I encountered that error…

Could you please attach your project file?