Export to MS Excell, last digit turn into zero |
Hello
Right now i already success in exporting my data from my CI website ( mine use mysql) into MS excell . But if the data digit if bigger than 16, it digit turn into zero. For example,,in mysql my data is 12345678912345678, but after i export it into MS EXcel it change to 12345678912345670. I google and it says that ms excell change last digit into zero it if number if greater than 16 digit. I already try to change datatype in mysql from varchar to tinytext, but the problem still happen. How to solve it? Thanks.
Cast value to text and enclose into `12345678912345678` characters.
Also depending on Excel version you may just add whitespace before the value, and enclose into single quotes: ' 12345678912345678'.
Yup,,in the export file, i change into this:
<td><?php echo ' '.$k->pengguna_username;?></td> It works,,in Excell, it add space, and the number is not turn into zero at the end |
Welcome Guest, Not a member yet? Register Sign In |