php - Apply text wrap to CSV cell containing long string -


i using php code export data csv file.everything working fine required.but problem when there comes long text in cell.i want wrap text can increase cell size handle long text.below code.

header("content-type: application/force-download\n"); header("cache-control: cache, must-revalidate"); header("pragma: public"); header("content-disposition: attachment; filename=store_earning_report.csv"); echo "notes \n"; echo $notes; echo "\n"; exit; 

i have searched didn't find solution.is there way handle problem. thank you.

make sure including comma "," after each field, , "\r\n" trigger new line in .csv file created.

a .csv text file commas used separate field values - there no way can control cell sizes appear when file first opened in excel.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -