Fix/excel data format (#334)

This commit is contained in:
Jyong 2023-06-09 20:21:11 +08:00 committed by GitHub
parent 2ba0ee989a
commit 3d14431b96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)