K
K
KoRNeT46RuS2017-06-05 15:24:26
PHP
KoRNeT46RuS, 2017-06-05 15:24:26

How to beat "number saved as text" error in PHPExcel?

Hello everyone, when driving in a cell, msExcel swears at numbers, saying that the number is stored as text
b29d21f6281248d49df1d112ea75654e.png
Tried through the setValueExplicit method indicating the type. Did not help

$worksheet->getCell('L'.$row)->setValueExplicit($p->getQuantity(), \PHPExcel_Cell_DataType::TYPE_STRING);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Georgy Bondarenko, 2017-06-05
@KoRNeT46RuS

Have you tried it like this? should help)

$worksheet->getCell('L'.$row)->setValueExplicit($p->getQuantity(), \PHPExcel_Cell_DataType::TYPE_NUMERIC);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question