Export to Excel Overload resolution failed (v2021)

PHPMaker v2021.0.15
Got problem on export on listpage with excel and PhpSpreadsheet.
PDF, CSV also fails.


Uncaught TypeError: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed.
    at Object.<anonymous> (/-/js/ew.min.js:5)
    at c (/-/jquery/jquery-3.6.0.min.js:2)
    at Object.fireWith [as resolveWith] (/-/jquery/jquery-3.6.0.min.js:2)
    at l (/-/jquery/jquery-3.6.0.min.js:2)
    at XMLHttpRequest.<anonymous> (/-/jquery/jquery-3.6.0.min.js:2)

Make sure you have already enabled PhpSpreadsheet from Tools → Extensions, and then re-generate ALL the script files, and try again.

Warning: Cannot modify header information - headers already sent by (output started a --- php:4623) in\src\ExportExcel5.php on line 234

Thanks. Got a warning, and when I checked that php file on row 4623 I had a script. Removed it and worked.
It worked with the script when I had like 10row. but not 100+.
Dont need the script, so I removed it.

      echo "<script>function toggleDiv() {
       var button = document.getElementById('codesDiv');
       if (button.style.display === 'none') {
        button.style.display = 'block';
      } else {
        button.style.display = 'none';
      }
    }</script>";