Python Forum

Full Version: Reading from Excel: value not formula!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everybody

I am trying to read some data from an excel file in python. Here is a part of my code:
def main():


xl_element = utils.XlsxOpen(r'C:\..........sheet1.xlsx' )
value_1=utils.XlsxGetCellValue(xl_element, "Sheet1", 0 ,0)

print (value_1)

if __name__ == '__main__':
main()
The problem is that when it reads from excel, for the cells I have a formula it shows the formula , not the value calculated.
for example I have a cell with "COUNTA(F5:H5)" formula and value "2",... I need to save value in a variable in python not the formula.

Does anybody can help me?

Thank you.