From afe9770f7ff3bcdf48f0f09a449b1ac12cc8c045 Mon Sep 17 00:00:00 2001 From: Gutts-n Date: Tue, 16 Jan 2024 16:01:14 -0300 Subject: [PATCH] Fixed error to append sheets that have names greater than 31 chars --- routes/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/index.js b/routes/index.js index eefc5a7..5db558b 100644 --- a/routes/index.js +++ b/routes/index.js @@ -167,7 +167,7 @@ router.post(`/${APP_VERSION}/download`, async function (req, res, next) { const ws = xlsxHeader ? XLSX.utils.json_to_sheet(gqlRes[k], { header: xlsxHeader }) : XLSX.utils.json_to_sheet(gqlRes[k]) - XLSX.utils.book_append_sheet(wb, ws, k) + XLSX.utils.book_append_sheet(wb, ws, k.slice(0, 31)) }) if (ext === 'tsv' || (ext === 'csv' && colSep != ',')) { res.set('Content-Type', 'text/csv')