hi
This below code generates excel file.
But when i open it, the mobile number is right aligned in column in excel.
How can i left align it in excel through php ?
Also how do i increase column width in excel through php ?
thanks
vineet
Do you have a way to make sure that it’s being taken as a string - perhaps put single quotes around it? If Excel sees that it’s just a number, it will treat it as such and right-align it.
As for anything else, you’re not actually outputting an Excel spreadsheet as far as I can tell, you’re outputting tab-delimited text and giving it an XLS header. If you want to add formatting I think you’ll have to provide more information in your download. Of course, if you can do enough formatting to change column width, you can probably force left-alignment for the mobile number too.
ok i was able to change mobile number to string and its now left aligning correctly.
Can you tell me how to change the column width ?
what more information do i have to provide in my download in addition to headers ?
thanks
vineet