we're offering an exporti on one of our databases.
Most fields contain text or numbers. There is one mixed field of serial numbers,
which may contain letters and digits. As long as the field contains at minimum one letter everything is fine. Excel recognizes it as text, so far so good.
As soon as the field contains only numbers and its length is less than 8 also everything is fine. BUT as soon the length is 8 or more Excel will crash the number into some crap.
I was looking for some formatting stuff during the export e.g
but I could not find the right stuff on declaring the default data type in the excel sheet.
I am sending you demo code that allow you to set this statement using phpgrid export callback function.
thx for your answer.
I saw your example already in the demo code, but it does not help me at all. I want to have one cell in the exported excel sheet as a predefined
text field, independent from the source field, which can be a text string or a number format.
Extending above code, you can have following function. It will set C5 as TEST in exported excel.
$objPHPExcel = $param["phpexcel"];
$arr = $param["data"];
yeah, I saw that also, but it does not work for me.
I need to define the cell format, not the content.
The content(for this cell) can content numbers and/or letters.
If only numbers, I still want to be the cell a text cell.
Please refer this:
This phpexcel formatting help can be found on stackoverflow.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?