Remove row.
Contoh di bawah, jika nak remove row nombor 6 sebanyak 4 kali.
<?php for($i=0; $i<4; $i++){ $objPHPExcel->getActiveSheet()->removeRow(6); } ?>
Remove row.
Contoh di bawah, jika nak remove row nombor 6 sebanyak 4 kali.
<?php for($i=0; $i<4; $i++){ $objPHPExcel->getActiveSheet()->removeRow(6); } ?>
Posted by ayus at 4:14 AM 0 comments
Labels: phpexcel, remove row
Masukkan key Enter ke dalam field Excel guna PHPExcel. Gunakan str_replace(). Replace coma kepada \n
<?php $objPHPExcel->getActiveSheet()->SetCellValue('O'.$bil, strtoupper(str_replace(',',"\n",c($row['kriteria'])))); setCenterOnEmpty($row['kriteria'], 'O'.$bil, $objPHPExcel); if(!function_exists("setCenterOnEmpty")){ function setCenterOnEmpty($data, $index, $objPHPExcel){ if($data==' - ' || $data=='-' || $data=='')$objPHPExcel->getActiveSheet()->getStyle($index)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); }} ?>
Posted by ayus at 1:24 AM 0 comments
Labels: phpexcel
Menulis bukan untuk berkongsi ideologi, sekadar nota kecil buat bekal diri.
(c)Ayus 2008 de Abu Faaris | Lawati web utama di Nursyuhada.com