From f1be5c3ea624f7157e3d84f35ade2cb463f7be2f Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sat, 21 Jan 2023 12:01:22 +0530 Subject: [PATCH] fix(gui): retain null/undefined as null while parsing for string type Signed-off-by: Pranav C --- packages/nc-gui/utils/parsers/ExcelTemplateAdapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nc-gui/utils/parsers/ExcelTemplateAdapter.ts b/packages/nc-gui/utils/parsers/ExcelTemplateAdapter.ts index f0628d7558..9e2b087aa2 100644 --- a/packages/nc-gui/utils/parsers/ExcelTemplateAdapter.ts +++ b/packages/nc-gui/utils/parsers/ExcelTemplateAdapter.ts @@ -258,7 +258,7 @@ export default class ExcelTemplateAdapter extends TemplateGenerator { const cellObj = ws[cellId] rowData[table.columns[i].column_name] = (cellObj && cellObj.w) || row[i] } else if (table.columns[i].uidt === UITypes.SingleLineText || table.columns[i].uidt === UITypes.LongText) { - rowData[table.columns[i].column_name] = `${row[i]}` + rowData[table.columns[i].column_name] = row[i] === null || row[i] === undefined ? null : `${row[i]}` } else { // TODO: do parsing if necessary based on type rowData[table.columns[i].column_name] = row[i]