Commit a1166f42 authored by 王源's avatar 王源 🎧

Merge branch 'test' into user-rpc

parents aac24a88 285edc97
......@@ -251,6 +251,8 @@ class ExcelImporter
* @param array $list
* @param array $data
* @return bool
* @see check_diff_val()
* @deprecated 此方法废弃,直接调用check_diff_val()
*/
public static function checkDiffVal(array $list, array $data)
{
......
......@@ -100,17 +100,19 @@ class Exporter
/**
* 设置非保护区间,调用此方法全表将自动保护
* @param string $unprotectRange 例如"A1:B1";从A列B列第一行到数据结束行不需要保护
* @param mixed $unprotectRange 可传数组,字符串或者多个参数形式('A1:B1', 'C1:D1')
* 例如"A1:B1";从A列B列第一行到数据结束行不需要保护
* @return $this
*/
public function setUnprotectRange($unprotectRange = "")
public function setUnprotectRange($unprotectRange = null)
{
$this->sheet->getProtection()->setSheet(true);
$this->sheet->getProtection()->setPassword('micro-ttt');
$this->sheet->getProtection()->setPassword('micro-tttt');
if ($unprotectRange) {
$this->sheet->getStyle($unprotectRange)
->getProtection()
->setLocked(Protection::PROTECTION_UNPROTECTED);
$unprotectRange = is_array($unprotectRange) ? $unprotectRange : func_get_args();
foreach ($unprotectRange as $range) {
$this->sheet->getStyle($range)->getProtection()->setLocked(Protection::PROTECTION_UNPROTECTED);
}
}
return $this;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment