Problem to fill cell whith a text value

Topics: Developer Forum, User Forum
May 22, 2013 at 7:52 AM
Hi,

I have an Excel File (created with Excel 2010).

I want to fill a cell with the value '0001'. The cell's format is 'text'.

(php)
$value = "0001";
I use : $sheet->setCellValue("A1",$value);

Doesn't work. I obtain : "1" in A1

thx
Coordinator
May 22, 2013 at 8:24 AM
May 22, 2013 at 8:47 AM
THANKS !
Apr 29, 2014 at 11:32 AM
MarkBaker wrote:
There are days when I wonder why I bother writing documentation:

https://github.com/PHPOffice/PHPExcel/blob/develop/Documentation/markdown/Overview/07-Accessing-Cells.md#setting-a-number-with-leading-zeroes
This bash on him is not fair, I too have been looking for this information, and could not find it in documentation, I checked the 4 doc files bundled WITH the PHPexcel release, specifically the one called "PHPExcel developer documentation.doc" - which does not include the chapters you linked to above.

I also looked here: https://phpexcel.codeplex.com/wikipage?title=Documents&referringTitle=Contact
And as you can see, no reference in the Documents section to the github documentation...
I only found the solution you documented, elsewhere in a forum search here someone discovered that Explicit function, without seeing your documentation...

If you want it to be easily found, please link to it on the project's home page, AND include it in the downloadable bundle :)