Error when exporting to excel

Hi, i have a grid created with prior SC version. I generated to new version SC, when i export to excel, SC show next errors:

Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in C:\Program Files\NetMake\v9-php81\wwwroot\scriptcase\app\PosMS2020\rpt_grid_pxs_inventario_gral\rpt_grid_pxs_inventario_gral_xls.class.php:1020 Stack trace: #0 C:\Program Files\NetMake\v9-php81\wwwroot\scriptcase\app\PosMS2020\rpt_grid_pxs_inventario_gral\rpt_grid_pxs_inventario_gral_xls.class.php(1020): method_exists(NULL, ‘controle’) #1 C:\Program Files\NetMake\v9-php81\wwwroot\scriptcase\app\PosMS2020\rpt_grid_pxs_inventario_gral\rpt_grid_pxs_inventario_gral_xls.class.php(611): rpt_grid_pxs_inventario_gral_xls->proc_label() #2 C:\Program Files\NetMake\v9-php81\wwwroot\scriptcase\app\PosMS2020\rpt_grid_pxs_inventario_gral\rpt_grid_pxs_inventario_gral_xls.class.php(56): rpt_grid_pxs_inventario_gral_xls->grava_arquivo() #3 C:\Program Files\NetMake\v9-php81\wwwroot\scriptcase\app\PosMS2020\rpt_grid_pxs_inventario_gral\index.php(3321): rpt_grid_pxs_inventario_gral_xls->monta_xls() #4 C:\Program Files\NetMake\v9-php81\wwwroot\scriptcase\app\PosMS2020\rpt_grid_pxs_inventario_gral\index.php(5470): rpt_grid_pxs_inventario_gral_apl->controle() #5 {main} thrown in C:\Program Files\NetMake\v9-php81\wwwroot\scriptcase\app\PosMS2020\rpt_grid_pxs_inventario_gral\rpt_grid_pxs_inventario_gral_xls.class.php on line 1020