Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/10/2014, 04:01
jonsanchezlizarraga
 
Fecha de Ingreso: octubre-2014
Ubicación: Andalucia
Mensajes: 4
Antigüedad: 9 años, 6 meses
Puntos: 0
Exclamación Respuesta: PHPExcel me devuelve fórmula, no dato

Yo tengo el mismo problema y el getCalculatedValue() no me va bien ya que me devuelve valores incorrectos cuando haciendolo con $cell->getValue(); me devuelve la formula bien.

foreach ($objWorksheet->getRowIterator() as $row) {
//echo '<tr>' . "\n";
$cellIterator = $row->getCellIterator();
$cellIterator->setIterateOnlyExistingCells(false);
$line= $line + 1;
$counter = 0;
$report = 0;
foreach ($cellIterator as $cell) {
$counter= $counter + 1;
//if ($line <=2) TO show the header
if ($line <=2)
{
//echo '<td>' . $cell->getValue() . '</td>' . "\n";//Draw the table
}
if ($line > 2)
{
if ($report == 0)
{
//QUO_VALUE
if ($counter == 27)
{
$row_QUO_VALUE = $cell->getValue();
echo $row_QUO_VALUE.", ";
$row_QUO_VALUE = variable_doubleval($row_QUO_VALUE);
echo $row_QUO_VALUE."</br>";
//MONEDA
if (!is_numeric ($row_QUO_VALUE) || $row_QUO_VALUE =='')
{
$report = 1;
$comment = "Quote Value was not an integer value or was empty";
}
}//if($counter == 27)
}
}


Como lo podría solucionar?¿

Estoy atascado.

Gracias y Un Saludo a todos los foreros de la web