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

Source File - openpyxl fails to interpret excel formula results #48774

Open
1 task done
walker-philips opened this issue Dec 2, 2024 · 0 comments
Open
1 task done

Comments

@walker-philips
Copy link

Connector Name

source-file

Connector Version

0.5.15

What step the error happened?

During the sync

Relevant information

The openpyxl approach to reading excel files seems to extract the formula(s) itself rather than the value the formula evaluates to.

The standard approach of using pandas to read the file results in the expected outputs.

I saw this issue while fixing/debugging another issue in source-file, so my testing was via CLI with poetry using the read() method. I would imagine the results would be the same when run from a deployed connector within the UI.

The easy solution solution would be to provide an option to choose between openpyxl and pandas within the connector setup rather than the current try except approach.

There appears to be a potential issue with openpyxl itself. The quick fix may be the data_only parameter into load_workbook.

I think the behavior is extremely dependent on what formulas someone is using. I have run into this issue with excel add-ons where there is a much for involved process to trigger a refresh of the workbook. I will try and dig up old code and offer that up as a bullet proof approach to reading any excel data.

Relevant log output

Contribute

  • Yes, I want to contribute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants