From be797b1d222ace39f71b78c51745b4fa1b0a3b56 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 19 Apr 2023 15:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86excel=E7=9A=84header=E5=BC=BA=E5=88=B6?= =?UTF-8?q?=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/excel.util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/excel.util.ts b/src/utils/excel.util.ts index efc1d2f..c25740d 100644 --- a/src/utils/excel.util.ts +++ b/src/utils/excel.util.ts @@ -7,7 +7,7 @@ export function excelToJson(filePath: string) { throw new Error('excelToJson: no sheet found') } const sheet = workSheetsFromFile[0] - const header = sheet.data[0] as string[] + const header = (sheet.data[0] as string[]).map(item => item.toLowerCase()) let arr = [] for (let i = 1, l = sheet.data.length; i < l; i++) { let row = sheet.data[i] as []