Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-study-front-share
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
yifu-study
front
yifu-study-front-share
Commits
c90c966a
Commit
c90c966a
authored
May 24, 2022
by
liyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5月分享
parent
7d8d787c
Pipeline
#16133
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
用xlsx-style玩转Excel导出——拿走即用的Excel导出方法封装.md
source/_posts/用xlsx-style玩转Excel导出——拿走即用的Excel导出方法封装.md
+1
-6
No files found.
source/_posts/用xlsx-style玩转Excel导出——拿走即用的Excel导出方法封装.md
View file @
c90c966a
...
...
@@ -90,12 +90,7 @@ const _header = header.map((item, i) =>
}), {},
)
```
其中,_header的打印格式如下:
![
image.png
](
https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/3924e8fdb5f846da9f2eb7b3c6eef381~tplv-k3u1fbpfcp-watermark.image?
)
从上述打印可以看出,header已经被处理成worksheet Object,而其中很重要一步,就是定位单元格,而我们Excel是用字母+数字的形式定位单元格的,所以我们可以通过如下代码定位单元格。
header已经被处理成worksheet Object,而其中很重要一步,就是定位单元格,而我们Excel是用字母+数字的形式定位单元格的,所以我们可以通过如下代码定位单元格。
```
js
position
:
getCharCol
(
i
)
+
1
...
...
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