Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XLSX reader: support formula cells #30

Open
lukavdplas opened this issue Feb 4, 2025 · 1 comment
Open

XLSX reader: support formula cells #30

lukavdplas opened this issue Feb 4, 2025 · 1 comment

Comments

@lukavdplas
Copy link
Contributor

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?

@jgonggrijp
Copy link
Contributor

Don't support it and tell users to convert to CSV first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants