python - Openpyxl 1.8.5: Reading the result of a formula typed in a cell using openpyxl -


I'm printing some formula in one of the Excel sheets:

  wsOld.cell (Line = 1, column = 1) .value = "= B3 = B4"  

But I can not do this to introduce some other logic, as such:

  if ((wsOld.cell (line = 1, column = 1) .value) = 'true'): # Copy the second line of the second line  

Even when I'm trying to print results in the command line, I touch the formula Mapt hereby:

 > gt; & Gt; Print (wsOld.cell (line = 1, column = 1)) & gt; & Gt; & Gt; = B3 = B4  

How can I get the result of the form in the cell and not the formula?

OpenPaxL either supports the formula or value of the formula. You can choose whether to open a workbook by using the data_only flag. However, the OpenPixel will not calculate the result of a formula and will not. There is a pycel out of libraries like that which is to do.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -