From 3de10413cf500e4cd04f57c47dd9a89d7ae5e6bb Mon Sep 17 00:00:00 2001 From: truthwing Date: Thu, 24 Apr 2025 15:27:51 +0900 Subject: [PATCH] =?UTF-8?q?=ED=97=A4=EB=8D=94=20=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business_components/src/ui/excel_download/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/common/business_components/src/ui/excel_download/index.tsx b/packages/common/business_components/src/ui/excel_download/index.tsx index 48341bc12..24f8cb4bf 100644 --- a/packages/common/business_components/src/ui/excel_download/index.tsx +++ b/packages/common/business_components/src/ui/excel_download/index.tsx @@ -14,7 +14,7 @@ export const downloadExcel = ({ data, fileName = new Date().getTime().toString() //XLSX.write(workbook, { bookType: "xlsx", type: "binary" }); XLSX.writeFile(workbook, fileName + '.xlsx'); }; -export const filePicked=(oFile: File) =>{ +export const filePicked=(oFile: File, headerNum:number) =>{ // Create A File Reader HTML5 const reader = new FileReader(); @@ -31,7 +31,7 @@ export const filePicked=(oFile: File) =>{ // Obtain The Current Row As CSV const sheet = wb.Sheets[sheetName]; if (sheet) { - const jsonXls = XLSX.utils.sheet_to_json(sheet); + const jsonXls = XLSX.utils.sheet_to_json(sheet, {range:headerNum}); console.log(jsonXls); } else { console.error(`Sheet "${sheetName}" is undefined.`);