0

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.

Dror Av.
  • 1,184
  • 5
  • 14
Ian Bell
  • 533
  • 5
  • 18
  • 1
    The question doesn't include any attempt to solve the problem. [Try to solve your own problem first](https://meta.stackoverflow.com/questions/261592/how-much-research-effort-is-expected-of-stack-overflow-users), your attempts help us to better understand what you want. Please show what you've tried and any specific roadblock you're running into with [Minimal, Complete, and Verifiable example](https://meta.stackoverflow.com/questions/261592/how-much-research-effort-is-expected-of-stack-overflow-users). For more information [How to ask a good question](https://stackoverflow.com/help/how-to-ask). – run-out May 25 '20 at 02:32
  • Please refer to [this answer](https://stackoverflow.com/questions/47311994/how-to-get-value-of-cell-instead-formula-value) – Dror Av. May 27 '20 at 09:32

0 Answers0