-1

I have an Excel 2003 spreadsheet with values and formulas. Using Python 2.7, I need to read all the values from the spreadsheet, and none of the formulas. If a cell has a formula, I need the cached value from the cell. Using xlrd, how can I get the actual values from cells which contain formulas? My current method of retrieving the values in each cell gives me incorrect values for any cell which contains a formula.

Greymarch
  • 606
  • 2
  • 7
  • 11

1 Answers1

-1

By default, I think that's how it works, right. I mean, you have to go out of your way to get the formulas, and just a simple read will get you the data, or calculated values, right.

Try this.

wb = openpyxl.load_workbook(filename, data_only=True)

ASH
  • 20,759
  • 19
  • 87
  • 200