mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
Fix/excel data format (#334)
This commit is contained in:
parent
2ba0ee989a
commit
3d14431b96
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user