text: function exportTableToExcel(tableID, fileName = '') {
      let downloadLink;
      let dataType = 'application/vnd.ms-excel';
      let tableSelect = document.getElementById(tableID);
      let tableHTML = tableSelect.outerHTML.replace(/ /g, '%20');
  
      fileName = fileName ? fileName + '.xls' : 'excel_data.xls';
      downloadLink = document.createElement('a');
      document.body.appendChild(downloadLink);
  
      if (navigator.msSaveOrOpenBlob) {
          var blob = new Blob(['\ufeff', tableHTML], {
              type: dataType
          });
          navigator.msSaveOrOpenBlob(blob, fileName);
      } else {
          // Create a link to the file
          downloadLink.href = 'data:' + dataType + ', ' + tableHTML;
  
          // Setting the file name
          downloadLink.download = fileName;
  
          //triggering the function
          downloadLink.click();
      }
  }