I am using workbook and worksheet library to download excel sheet in our project. But this library write data in “text” or “general” format which is a problem. Most users want to sort the date so with the current format, the problem now is that they will be sorted alphabetically. Hence, please help me to format as in date so when sorted it will follow accordingly (oldest to newest or newest to oldest).
Is there any function or class in php that format date string (Like “24 Aug 2011”) to actual date formate ?
Thanks a lot.
BiffWriter allows for writing dates as Excel date integers:
And then you can use this to write the data to your file:
Referenced from the BiffWriter docs.