const xslsHeaders = [type, "Total", "Percentage"]; const sheetData = [[type, "", ""], [dateRange, "", ""], xslsHeaders, ...main]; onClick={() => exportFile(`${type} ${dateRange}`, sheets)}