// downloadExcel.ts
import * as XLSX from 'xlsx-js-style';

export const downloadExcel = (data: any[]) => {
  const worksheet = XLSX.utils.json_to_sheet(data);
  const workbook = XLSX.utils.book_new();
  XLSX.utils.book_append_sheet(workbook, worksheet, 'Report');
  XLSX.writeFile(workbook, 'Report.xlsx');
};
