Skip to content

XLSX reader: support formula cells #30

@lukavdplas

Description

@lukavdplas

Say a user has written a spreadsheet like this:

X	Y
1	=A2*2
2	=A3*2
3	=A4*2

Right now, the XLSXReader will output the values of column Y as '=A2*2', '=A3*2', '=A4*2', i.e. the formula strings. You would probably want the column to be read as 2, 4, 6, i.e. the calculated values.

Suggested implementation

Looks like this is fixed if you use data_only=True when calling openpyxl.open_workbook. Not sure if that affects anything else, though. Also, perhaps there are cases where the user does want the original formula?

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