Wednesday, 26 July 2017

PhpSpreadsheet : Protected Cells

Status : Draft

Berikut hanya potongan-potongan kode saja :

//style cell yang dapat diedit
$editable_cell_style = array(
 'fill' => array(
  'type' => PHPExcel_Style_Fill::FILL_SOLID,
  'color' => array('rgb' => '66ff99')
  )
);

//protect all cell by default
$sheet->getProtection()->setPassword('amanah');
$sheet->getProtection()->setSheet(true);

$sheet->getStyle('C6')->getProtection()->setLocked(PHPExcel_Style_Protection::PROTECTION_UNPROTECTED);
$sheet->getStyle('C6')->applyFromArray($editable_cell_style);

//sembunyikan kolom A
$sheet->getColumnDimension("A")->setVisible(false);

1 comment:

  1. Sega Genesis Classics - Airjordan's 14Retro
    Sega Genesis Classics is a compilation of over 50 classic titles from the golden air jordan 18 retro men red clearance era of Sega. how can i buy air jordan 18 retro men red It includes over replica air jordan 18 retro red 50 get air jordan 18 retro yellow suede titles, including air jordan 18 retro red sports Sonic the Hedgehog,

    ReplyDelete