Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read the visible data of the cell, not the underlying formula in PHPExcel?

Tags:

php

phpexcel

I want to know how to read the visible/calculated contents of the cells of an Excel Sheet & not the underlying formula. For example:- if a cell contains sum(a1,a5) which equals say 123, then it shud read 123, not sum(a1,a5). Similarly for time, it shud read the time as it is, n not the referential value in ratio of 24:00:00...

Please help me out!!!

Viral Jain

like image 212
Viral Jain Avatar asked Oct 11 '22 10:10

Viral Jain


1 Answers

You can use ...->getCell($columnAsLetters.$row)->getCalculatedValue(); as described in this thread: How to automatically read in calculated values with PHPExcel?

like image 95
JMax Avatar answered Oct 13 '22 02:10

JMax