Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-rpc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
without authentication
meibuyu-rpc
Commits
ce237f0b
Commit
ce237f0b
authored
Aug 05, 2020
by
王源
🎧
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into test
parents
36c40cb5
f1ab76f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
Exporter.php
src/Tools/Exporter.php
+8
-6
No files found.
src/Tools/Exporter.php
View file @
ce237f0b
...
...
@@ -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-ttt
t
'
);
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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment