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
Post a Comment