Skip to content

when span > 2 ,open execl file will be error #8

@zhu1fei

Description

@zhu1fei

if cell_data.columns > 1 or cell_data.span > 1:

when span >2 , merge_range(L197) will merge multiple times, generated execl can't open.

this json data convert to execl will be open with a error.
[
{
"col1": "val1",
"col2": [
{
"col21": {"col31": "val3"}
},
{
"col21": {}
}
]
}
]

fix method:
json_excel_converter/xlsx/init.py#L179:
if cell_data.columns > 1 or cell_data.span > 1:
change to :
if (cell_data.columns > 1 or cell_data.span > 1) and cell_data.value != '':

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions