phpexcel 加锁
$objPHPExcel->getActiveSheet()->getProtection()->setSheet(true);
$objPHPExcel->getActiveSheet()->protectCells('A1:'. $w_str . "2", 'PHPExcel');
$objPHPExcel->getActiveSheet()->getStyle('B3:' . $str.$h)->getProtection()->setLocked(PHPExcel_Style_Protection::PROTECTION_UNPROTECTED);
转载保留链接