1

I am using a php library for exporting MySQL data into Excel. One of the columns having 12 digits does not show the 12 digit number (because of excel). Every time I have to format a cell and select a number to view the full 12 digit number. How can I do this programmatically while writing Excel?

ouflak
  • 2,458
  • 10
  • 44
  • 49

1 Answers1

0

You should set autosize so your cells will automatically adjust the width according to the size of data. I'm not sure which library you are using but this can be helpful if you are using PHPSpreadsheet.

https://stackoverflow.com/a/62203840/18078120

If you are using PHPExcel then this might help

https://stackoverflow.com/a/16762003/18078120

  • Thank you for your response..but I am using core PHP for export to excel ..So How I can Solve these problem. – pooja khambe Mar 07 '22 at 05:25
  • Hello. Can you please add some code? It would be better to use Library because then you can customize your Excel more efficiently. – Shalini Singh Mar 07 '22 at 14:29