I am using openpyxl
and pandas
to read values from an excel sheet into my python script. However, since there is a formula in some cells, it reads the 'formula' instead of the value
.
How do I get the value of a cell instead of the formula of that cell?
For example, a cell with the formula - =CONCATENATE(A23," ","gold")
, and its value is 'Ghana Gold'
. I want it to return 'Ghana Gold'
, however, at the moment I am getting '=CONCATENATE(A23," ","gold")
.
P.S. for reference - I referred to https://medium.com/analytics-vidhya/how-to-extract-information-from-your-excel-sheet-using-python-5f4f518aec49 for the data extraction part.