I am working on phpexcel i have string around 100 characters, and i am placing it in the cell value, when i download that excel file it is getting value cut, and when i am click on cell at that time it shows full string, i want to show that full string, rather than cut in cell, here i have added my code for that, can anyone please help me how can i resolve this issue ?
Current Result :
Expeected Result :
Code :
$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->setCellValue('A1','Report Date : '.date("F d, Y"));
$objPHPExcel->getActiveSheet()->setCellValue('B3','Starting Episodes : December, 2017 (Month)');
$objPHPExcel->getActiveSheet()->setCellValue('B4','Branches : Branches : Columbia , Concord , Madison , Ogden , Springfield , Unmatched ZipColumbia , Concord , Madison , Ogden , Springfield , Unmatched Zip');
$objPHPExcel->getActiveSheet()->getStyle("B3:H3")->getFont()->setSize(16);
$objPHPExcel->getActiveSheet()->getStyle('B3:H3')->getFont()->setBold(true);
$objPHPExcel->getActiveSheet()->mergeCells('A1:B1');
$objPHPExcel->getActiveSheet()->mergeCells('B3:H3');
$objPHPExcel->getActiveSheet()->mergeCells('B4:H4');
$excel_path = dirname(__FILE__); //$_SERVER['DOCUMENT_ROOT']; //dirname(__FILE__);
$save_file_path = $excel_path.'/../../results.xlsx';
//echo $save_file_path; die;
ob_clean();
//$output=$header."
".$data;
header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
//header('Content-Type: application/vnd.ms-excel');
//header("Content-Disposition: attachment; filename=".$name.".xls");
header("Content-Disposition: attachment; filename=\"$name.xlsx\"");
header("Cache-Control: max-age=0");
header('Content-Transfer-Encoding: binary');
header("Expires: 0");
header("Cache-Control: no-cache");
header("Pragma: no-cache");
//header('Content-Length: ' . strlen($final_data));
//if (function_exists('mb_internal_encoding'))
//mb_internal_encoding($oldEncoding);
$objWriter->save($save_file_path);
$objWriter->save("php://output");
//ob_clean();
die;