0

I'm learning PHP & CodeIgniter 3. In this project I need to export some data to a CSV file. I'm able to export the CSV file, however the data is displaying incorrectly in a couple columns. Example (5.32856E+11) where it should be (532856165001). I'm able to see the actual value if you double click the cell.

enter image description here

Is there anyway to force the data in a CSV to display the data correctly?

halfer
  • 19,824
  • 17
  • 99
  • 186
user752746
  • 617
  • 9
  • 31
  • Possible duplicate of [Prevent Excel from reformatting text in the scientific notation](https://stackoverflow.com/questions/18816995/prevent-excel-from-reformatting-text-in-the-scientific-notation) – Obsidian Age Jan 28 '19 at 22:16
  • Thank you for comment, I will look into PHPSpreadsheet. I was reluctant to use PHPSpreadsheet because it has such a big foot print. I was was hoping CI has something built-in that I not aware of. – user752746 Jan 28 '19 at 22:35

1 Answers1

0

This is the microsoft excel formatting and does not have any relation with your code just try to regenerate your csv and then re-open your file with a simple text editor (notepad++ or sublim text)