Skip to content

Excel.decodeBytes crashes on valid XLSX file (Parser._parseTable) #451

Description

@mhanuska-coder

Description:

Environment:

Flutter
excel: 4.0.6

Problem:

Excel.decodeBytes() crashes with:

Null check operator used on a null value

Stack trace:

Parser._parseTable
Parser._parseContent
Excel.decodeBytes

Important observation:

The XLSX file opens normally in Microsoft Excel 2021.

Workaround that fixes the issue 100%:

Open the problematic XLSX file in Excel.
Save it as XLS (Excel 97-2003 Workbook).
Open the XLS file.
Save it again as XLSX.
The new XLSX file loads correctly with Excel.decodeBytes().

This suggests that the parser has a problem with some XLSX structures generated by newer Excel formats, while the XLS->XLSX conversion rewrites the workbook into a format that the parser can read correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions