python 2.7 - After writing formulae into excel sheet with xlwt, reading cells with formulae by xlrd returns blank -


i have first created pivot table using pandas. saved worksheet. wrote data & formulae in worksheet using xlwt further processing. trying read value cell had written formula.

book = xlrd.open_workbook(fname)  sheet = book.sheet_by_name('pivot table')  print 'spare',sheet.cell(11,10).value

this code works fine , returns proper values when pointing cell without formula (that depends on other cells). cells formulae return nothing.

i need way read cell value. excel sheet has lot of formulae written , cell trying read final cell. not want back-track process value (compute through script).

i using ubuntu , have libreoffice. (fyi, in case there no direct way , need open excel , fetch data)

this can't done.

after writing excel xlwt package, need open excel , save it. opening excel file populate cells containing formulae calculated values. saving excel save these values cells along formulae.

some things observed-

  1. the above true cells formulae use values in other cells. if try read cells formulae '=10+2' or something, returns right value.
  2. after opening excel, need edit/add enable save button/option.

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -