How to evaluate a excel formula through XSSF event API

前端 未结 1 702
醉话见心
醉话见心 2021-01-13 01:38

I am reading XLSX files using event API of Apache POI, i.e I read the contents of the XLSX sheet through a SAX Parser. I want to know how can we get the computed value of a

相关标签:
1条回答
  • 2021-01-13 02:17

    Generally the cached value will be written with the cell, so you can just read that (no need to evaluate)

    Taking this formula cell as an example:

      <c r="B10">
        <f>SUM(B1:B9)</f>
        <v>4995</v>
      </c>
    

    You read the f value to get the formula itself, or just read the v value to see what the evaluation of the formula was when excel last touched the file. No need to evaluate!

    0 讨论(0)
提交回复
热议问题