How can I keep original format of an integer values after converting it into XLS file? Currently it changes and I see E+ sign and some numbers at the end of the original value. Also zero(0) at the beginning disappears.
Thanks
$OUTPUT.= "<td>".$row["telephone"]."</td>"; //Original value 0852055504077
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;Filename=file.xls');
echo $OUTPUT;
RESULT is 8.52056E+11
A possible solution is to add an apostrophe (
') before the phone number:In that way you let Excel know not to interpret the value in that cell.