From 704d14e7eeeaa93e9522e44de24544d7747a6754 Mon Sep 17 00:00:00 2001 From: Mustafa Saifee Date: Thu, 7 Mar 2024 20:41:19 +0200 Subject: [PATCH] Fix excel download issue --- src/Components/DownloadExcel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/DownloadExcel.tsx b/src/Components/DownloadExcel.tsx index b14ee1c..7280c49 100644 --- a/src/Components/DownloadExcel.tsx +++ b/src/Components/DownloadExcel.tsx @@ -48,7 +48,7 @@ function ExportExcel(props: Props) { const wscols = [{ wch: 20 }, { wch: 5 }, { wch: 15 }]; ws['!cols'] = wscols; - XLSX.utils.sheet_add_json(ws, [csvData[0]], { + XLSX.utils.sheet_add_json(ws, csvData, { header: ['country', 'countryCode', 'year', 'value'], skipHeader: true, origin: -1, // ok