Skip to content

[Improvement] reading excel file from base64 should allow ignoring data uri information #2762

@AbdelrahmanHafez

Description

@AbdelrahmanHafez

When reading a base64 file, it would be nice if XLSX would ignore the leading data URI parameters.
So it can treat
data:text/csv;base64,TmFtZXMNCkhhZmV6DQpTYW0NCg==
the same way it treats
TmFtZXMNCkhhZmV6DQpTYW0NCg==

const workBook = XLSX.read(sheetInBase64, { type: 'base64' });
// workBook should be the same whether `sheetInBase64` starts with a dataURI scheme or without it.

I would like to create a PR with that fix, but the tests file seem to be automatically generated, and when I run npm test I simply get bits/some_file.js in the log, with no output telling me whether the tests passed or failed.

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