Skip to content
Snippets Groups Projects

added excel download button to the pages

2 unresolved threads
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -3,7 +3,7 @@ import * as XLSX from "xlsx";
import {ExportType} from "../helpers/constants";
interface DownloadCSVProps {
interface DownloadProps {
data: any[];
filename: string;
exportType: ExportType;
@@ -56,7 +56,7 @@ function convertToExcel(jsonData: any[], sheetName = "Sheet1"): Blob {
return new Blob([buffer], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'});
}
const DownloadDataButton: React.FC<DownloadCSVProps> = ({data, filename, exportType}) => {
const DownloadDataButton: React.FC<DownloadProps> = ({data, filename, exportType}) => {
const downloadData = () => {
let convertedData;
Loading