-
-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Python version
Python 3.11.6
Package version
python-benedict 0.33.0
Current behavior (bug description)
Using the following code, benedict returns a dictionary with raw cell values, including formulas. Even though the data_only=True kwarg is passed into the constructor.
from benedict import benedict
content = benedict.from_xls("src/data/content.xlsx", sheet="Sheet3", data_only=True)
print(content)
Expected behavior
I believe benedict should return the data values instead of formulas. So it should return 'formula': 'A2 value is: abc' instead of 'formula': '="A2 value is: "&A2'.
I'm expecting this because it's an xlsx file, which the docs say uses openpyxl to fetch the data, and I'm passing the data_only=True kwarg into the constructor. If I try to access this data directly in openpyxl, it correctly returns the data values.
If I'm misunderstanding something about the way this is supposed to work, please let me know. :)
from openpyxl import open
wb = open("src/data/content.xlsx", data_only=True)
for i in wb['Sheet3'].values:
print(i)
Metadata
Metadata
Assignees
Labels
Projects
Status

