php export to excel column formatting

I am using 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 cell and select number to view the full 12 digit number.How can I do this programmatically while writing excel? Your help will be highly appreciated.