From 3d14431b961e09a8cedcba5d763249869204e616 Mon Sep 17 00:00:00 2001 From: Jyong <76649700+JohnJyong@users.noreply.github.com> Date: Fri, 9 Jun 2023 20:21:11 +0800 Subject: [PATCH] Fix/excel data format (#334) --- api/core/index/readers/xlsx_parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/core/index/readers/xlsx_parser.py b/api/core/index/readers/xlsx_parser.py index 28fd249add..6062e2ef3e 100644 --- a/api/core/index/readers/xlsx_parser.py +++ b/api/core/index/readers/xlsx_parser.py @@ -25,7 +25,7 @@ class XLSXParser(BaseParser): if all(v is None for v in row): continue if keys == []: - keys = row + keys = list(map(str, row)) else: - data.append(json.dumps(dict(zip(keys, row)), ensure_ascii=False)) - return data + data.append(json.dumps(dict(zip(keys, list(map(str, row)))), ensure_ascii=False)) + return '\n\n'.join(data)