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
237dd751
Commit
237dd751
authored
May 29, 2020
by
梁俊杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支持链式操作
parent
f490f534
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Exporter.php
src/Tools/Exporter.php
+7
-0
No files found.
src/Tools/Exporter.php
View file @
237dd751
...
...
@@ -111,6 +111,7 @@ class Exporter
->
getProtection
()
->
setLocked
(
Protection
::
PROTECTION_UNPROTECTED
);
}
return
$this
;
}
/**
...
...
@@ -137,6 +138,7 @@ class Exporter
$this
->
sheet
=
$this
->
reader
->
setActiveSheetIndexByName
(
$name
);
$this
->
sheetIndex
=
$this
->
reader
->
getActiveSheetIndex
();
$this
->
resetRowIndex
();
return
$this
;
}
/**
...
...
@@ -145,6 +147,7 @@ class Exporter
private
function
resetRowIndex
()
{
$this
->
beginRowIndex
=
1
;
return
$this
;
}
/**
...
...
@@ -162,6 +165,7 @@ class Exporter
public
function
setBeginColumnChar
(
$char
=
"A"
)
{
$this
->
beginColumnChar
=
$char
;
return
$this
;
}
/**设置从哪一行开始填充数据
...
...
@@ -170,6 +174,7 @@ class Exporter
public
function
setBeginRowIndex
(
$index
=
1
)
{
$this
->
beginRowIndex
=
$index
;
return
$this
;
}
/**
...
...
@@ -182,6 +187,7 @@ class Exporter
$this
->
sheet
=
$this
->
reader
->
setActiveSheetIndex
(
$sheetIndex
);
$this
->
sheetIndex
=
$sheetIndex
;
$this
->
resetRowIndex
();
return
$this
;
}
/**
...
...
@@ -212,6 +218,7 @@ class Exporter
//美化样式
$this
->
applyStyle
(
$this
->
beginColumnChar
.
$this
->
beginRowIndex
.
":"
.
$this
->
sheet
->
getHighestColumn
()
.
(
$this
->
beginRowIndex
+
count
(
$data
)
-
1
));
$this
->
beginRowIndex
+=
count
(
$data
);
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