brainite / php-file-converters

Provide unified interface for file conversion.
https://www.brainite.org/php-file-converters
MIT License
24 stars 6 forks source link

not merging cell in excel using php #81

Open rahul1303 opened 9 years ago

rahul1303 commented 9 years ago

i am using PHPExcel class to merge cell in .csv excel file. My code is running without any error but it is not merging my cell in excel file. I have read all the solution on google.,but still unable to figure it out whats wrong in it.Below is my code . I am working over xampp.


getActiveSheet()->mergeCells('A18:E22'); //code to merge the cells if(strtolower(end($chk_ext))=="csv") //this if loop will save some data in excel file { $fp=fopen($fname, "w"); $seperator=""; $comma=""; $seperator ="1,2,3,4,5,6"; $seperator .="\n"; $value12345=fputcsv($fp,explode(',',$seperator)); //insert data in excel file } fclose($fp); //close file } ?>

Download csv file