├── .gitignore
├── Dockerfile
├── LICENSE.txt
├── README.md
├── doc
├── Makefile
├── README.md
├── make.bat
├── requirements.txt
└── source
│ ├── conf.py
│ ├── index.rst
│ ├── install
│ ├── index.rst
│ └── installation.md
│ └── quick
│ ├── index.rst
│ └── tutorial.md
├── docker-compose.yml
├── pom.xml
├── readthedocs.yaml
└── src
├── main
├── java
│ └── t5750
│ │ └── poi
│ │ ├── PoiApplication.java
│ │ ├── command
│ │ ├── ExcelReplaceDataVO.java
│ │ └── ProductForm.java
│ │ ├── config
│ │ └── RestTemplateConfig.java
│ │ ├── controller
│ │ ├── ExcelController.java
│ │ └── ProductController.java
│ │ ├── converter
│ │ ├── ProductFormToProduct.java
│ │ └── ProductToProductForm.java
│ │ ├── domain
│ │ ├── Book.java
│ │ ├── Product.java
│ │ ├── SheetDTO.java
│ │ └── Student.java
│ │ ├── repository
│ │ └── ProductRepository.java
│ │ ├── service
│ │ ├── ExcelService.java
│ │ ├── ProductService.java
│ │ └── impl
│ │ │ ├── ExcelServiceImpl.java
│ │ │ └── ProductServiceImpl.java
│ │ └── util
│ │ ├── ClassLoaderUtil.java
│ │ ├── DateUtil.java
│ │ ├── EPlatform.java
│ │ ├── ExcelExportUtil.java
│ │ ├── ExcelReplaceUtil.java
│ │ ├── ExcelTemplateUtil.java
│ │ ├── Globals.java
│ │ ├── HuExcelUtil.java
│ │ └── OSinfo.java
└── resources
│ ├── application.properties
│ ├── doc
│ ├── productImport.xls
│ ├── replaceTemplate.xls
│ ├── template.xls
│ └── testRead.xls
│ ├── img
│ └── tomcat.png
│ └── templates
│ └── product
│ ├── list.html
│ ├── productform.html
│ └── show.html
└── test
└── java
├── org
└── apache
│ └── poi
│ └── ss
│ └── examples
│ └── CalendarDemo.java
└── t5750
└── poi
├── TestAll.java
├── TestHutoolPoi.java
├── export
├── TestExcelFormulaDemo.java
├── TestExcelStylingDemo.java
├── TestExportExcel.java
├── TestExportExcel2007.java
└── TestWriteExcelDemo.java
├── read
├── TestReadExcel.java
└── TestReadExcelDemo.java
├── replace
└── TestExcelReplace.java
├── template
└── TestTemplate.java
└── util
└── TestUtil.java
/.gitignore:
--------------------------------------------------------------------------------
1 | /build/
2 |
3 | ### STS ###
4 | .apt_generated
5 | .classpath
6 | .factorypath
7 | .project
8 | .settings
9 | .springBeans
10 | .sts4-cache
11 |
12 | ### IntelliJ IDEA ###
13 | .idea
14 | *.iws
15 | *.iml
16 | *.ipr
17 | /out/
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /nbbuild/
22 | /dist/
23 | /nbdist/
24 | /.nb-gradle/
25 |
26 | classes
27 | **/build
28 | .idea*.zip
29 | ### *.log & *.log.* ###
30 | *.log*
31 | target
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM openjdk:8
2 | EXPOSE 8080
3 | ARG JAR_FILE
4 | ADD target/${JAR_FILE} /poi.jar
5 | ENTRYPOINT ["java", "-jar","/poi.jar"]
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | https://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "{}"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright {yyyy} {name of copyright owner}
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | https://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Demos using Apache POI
2 |
3 | [](https://github.com/T5750/poi-repositories/blob/master/LICENSE.txt)
4 | [](https://github.com/T5750/poi-repositories/pulls)
5 | [](https://github.com/T5750/poi-repositories)
6 | [](https://github.com/T5750/poi-repositories)
7 |
8 | ## Docs
9 | - [https://poix.readthedocs.io](https://poix.readthedocs.io)
10 |
11 | ## Getting Started
12 | 
13 |
14 | Step 1: Download
15 | ```
16 | git clone https://github.com/T5750/poi-repositories.git
17 | cd poi-repositories
18 | ```
19 |
20 | Step 2: Start Server
21 | ```
22 | docker-compose up -d
23 | # or
24 | mvn clean spring-boot:run
25 | ```
26 | [http://localhost:8080/poi](http://localhost:8080/poi)
27 |
28 | ### Tests
29 | - `TestReadExcel`, `TestReadExcelDemo`
30 | - `TestExportExcel`, `TestExportExcel2007`, `TestWriteExcelDemo`
31 | - `TestTemplate`, `TestExcelReplace`
32 | - `CalendarDemo`
33 | - `TestExcelFormulaDemo`, `TestExcelStylingDemo`, `TestAll`
34 |
35 | ### Runtime Environment
36 | - [Java 8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
37 | - [Spring Framework 5.x](https://spring.io/projects/spring-framework)
38 | - [Spring Boot 2.x](https://spring.io/projects/spring-boot)
39 | - [Derby 10.x](https://db.apache.org/derby/)
40 | - [Hibernate ORM 5.x](http://hibernate.org/orm)
41 | - [POI 5.x](https://poi.apache.org/download.html)
42 | - [Bootstrap 4.x](https://github.com/twbs/bootstrap)
43 | - [Docker 19.x](https://www.docker.com/)
44 |
45 | ### Classes
46 | 1. **HSSF, XSSF and XSSF classes**
47 |
48 | Apache POI main classes usually start with either **HSSF**, **XSSF** or **SXSSF**.
49 | - **HSSF** – is the POI Project’s pure Java implementation of the Excel ’97(-2007) file format. e.g. [HSSFWorkbook](https://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFWorkbook.html), [HSSFSheet](https://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFSheet.html).
50 | - **XSSF** – is the POI Project’s pure Java implementation of the Excel 2007 OOXML (.xlsx) file format. e.g. [XSSFWorkbook](https://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFWorkbook.html), [XSSFSheet](https://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFSheet.html).
51 | - **SXSSF** (since 3.8-beta3) – is an API-compatible streaming extension of XSSF to be used when very large spreadsheets have to be produced, and heap space is limited. e.g. [SXSSFWorkbook](https://poi.apache.org/apidocs/org/apache/poi/xssf/streaming/SXSSFWorkbook.html), [SXSSFSheet](https://poi.apache.org/apidocs/org/apache/poi/xssf/streaming/SXSSFSheet.html). SXSSF achieves its **low memory footprint by limiting access to the rows that are within a sliding window**, while XSSF gives access to all rows in the document.
52 |
53 | 2. **Row and Cell**
54 |
55 | Apart from above classes, [Row](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Row.html) and [Cell](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Cell.html) are used to interact with a particular row and a particular cell in excel sheet.
56 |
57 | 3. **Style Classes**
58 |
59 | A wide range of classes like [CellStyle](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/CellStyle.html), [BuiltinFormats](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/BuiltinFormats.html), [ComparisonOperator](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/ComparisonOperator.html), [ConditionalFormattingRule](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/ConditionalFormattingRule.html), [FontFormatting](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/FontFormatting.html), [IndexedColors](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/IndexedColors.html), [PatternFormatting](https://poi.apache.org/apidocs/org/apache/poi/hssf/record/cf/PatternFormatting.html), [SheetConditionalFormatting](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/SheetConditionalFormatting.html) etc. are used when you have to add formatting in a sheet, mostly based on some rules.
60 |
61 | 4. **FormulaEvaluator**
62 |
63 | Another useful class **FormulaEvaluator** is used to evaluate the formula cells in excel sheet.
64 |
65 | ### Write an excel file
66 | 1. Create a workbook
67 | 3. Create a sheet in workbook
68 | 4. Create a row in sheet
69 | 5. Add cells in sheet
70 | 6. Repeat step 3 and 4 to write more data
71 |
72 | ### Read an excel file
73 | 1. Create workbook instance from excel sheet
74 | 3. Get to the desired sheet
75 | 4. Increment row number
76 | 5. iterate over all cells in a row
77 | 6. repeat step 3 and 4 until all data is read
78 |
79 | ## Getting Help
80 | Having trouble with T5750's POI? We’d like to help!
81 | - Ask a question on [CSDN](https://blog.csdn.net/evangel_z/article/details/7332535).
82 | - Report bugs at [https://github.com/T5750/poi/issues](https://github.com/T5750/poi/issues).
83 |
84 | ## Branch
85 | - View POI 3.x branch at [https://github.com/T5750/poi/tree/poi3](https://github.com/T5750/poi/tree/poi3).
86 | - View servlet branch at [https://github.com/T5750/poi/tree/servlet](https://github.com/T5750/poi/tree/servlet).
87 |
88 | ## References
89 | - [Java POI导出EXCEL经典实现 Java导出Excel弹出下载框](https://blog.csdn.net/evangel_z/article/details/7332535)
90 | - [Java POI读取Office excel (2003,2007)及相关jar包](https://blog.csdn.net/evangel_z/article/details/7312050)
91 | - [HSSF and XSSF Examples](http://poi.apache.org/spreadsheet/examples.html)
92 | - [Apache POI – Read and Write Excel File in Java](https://howtodoinjava.com/library/readingwriting-excel-files-in-java-poi-tutorial/)
93 |
94 | ## License
95 | This project is Open Source software released under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0.html).
96 |
--------------------------------------------------------------------------------
/doc/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line, and also
5 | # from the environment for the first two.
6 | SPHINXOPTS ?=
7 | SPHINXBUILD ?= sphinx-build
8 | SOURCEDIR = source
9 | BUILDDIR = build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 |
--------------------------------------------------------------------------------
/doc/README.md:
--------------------------------------------------------------------------------
1 | # POI Repositories
2 |
3 | ## POI Repositories RTD
4 | Read the Docs for POI Repositories
5 | - Docs: https://poix.readthedocs.io
6 | - Source: https://github.com/T5750/poi
7 |
8 | ## Runtime Environment
9 | - [Python 3.7.x](https://www.python.org/downloads/)
10 | - [pip 19.0.x](https://github.com/pypa/pip)
11 | - [Sphinx 2.2.x](http://www.sphinx-doc.org/en/master/usage/installation.html)
12 | - [recommonmark](https://github.com/readthedocs/recommonmark)
13 | - [readthedocs.org](https://github.com/readthedocs/readthedocs.org)
14 | - [sphinx_rtd_theme](https://github.com/readthedocs/sphinx_rtd_theme)
15 | - [sphinx-markdown-tables](https://github.com/ryanfox/sphinx-markdown-tables)
--------------------------------------------------------------------------------
/doc/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=sphinx-build
9 | )
10 | set SOURCEDIR=source
11 | set BUILDDIR=build
12 |
13 | if "%1" == "" goto help
14 |
15 | %SPHINXBUILD% >NUL 2>NUL
16 | if errorlevel 9009 (
17 | echo.
18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19 | echo.installed, then set the SPHINXBUILD environment variable to point
20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
21 | echo.may add the Sphinx directory to PATH.
22 | echo.
23 | echo.If you don't have Sphinx installed, grab it from
24 | echo.http://sphinx-doc.org/
25 | exit /b 1
26 | )
27 |
28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29 | goto end
30 |
31 | :help
32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33 |
34 | :end
35 | popd
36 |
--------------------------------------------------------------------------------
/doc/requirements.txt:
--------------------------------------------------------------------------------
1 | sphinx-markdown-tables
2 | docutils<0.18
3 | recommonmark
4 | sphinx-rtd-theme
--------------------------------------------------------------------------------
/doc/source/conf.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #
3 | # Configuration file for the Sphinx documentation builder.
4 | #
5 | # This file does only contain a selection of the most common options. For a
6 | # full list see the documentation:
7 | # http://www.sphinx-doc.org/en/master/config
8 |
9 | # -- Path setup --------------------------------------------------------------
10 |
11 | # If extensions (or modules to document with autodoc) are in another directory,
12 | # add these directories to sys.path here. If the directory is relative to the
13 | # documentation root, use os.path.abspath to make it absolute, like shown here.
14 | #
15 | # import os
16 | # import sys
17 | # sys.path.insert(0, os.path.abspath('.'))
18 |
19 |
20 | # -- Project information -----------------------------------------------------
21 |
22 | project = u'poi'
23 | copyright = u'2024, T5750'
24 | author = u'T5750'
25 |
26 | # The short X.Y version
27 | version = u''
28 | # The full version, including alpha/beta/rc tags
29 | release = u'1.0'
30 |
31 |
32 | # -- General configuration ---------------------------------------------------
33 |
34 | # If your documentation needs a minimal Sphinx version, state it here.
35 | #
36 | # needs_sphinx = '1.0'
37 |
38 | # Add any Sphinx extension module names here, as strings. They can be
39 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
40 | # ones.
41 | extensions = ['sphinx_markdown_tables','recommonmark'
42 | ]
43 |
44 | # Add any paths that contain templates here, relative to this directory.
45 | templates_path = ['_templates']
46 |
47 | # The suffix(es) of source filenames.
48 | # You can specify multiple suffix as a list of string:
49 | #
50 | # source_suffix = ['.rst', '.md']
51 | #source_suffix = '.rst'
52 | source_suffix = {
53 | '.rst': 'restructuredtext',
54 | '.txt': 'markdown',
55 | '.md': 'markdown',
56 | }
57 |
58 | # The master toctree document.
59 | master_doc = 'index'
60 |
61 | # The language for content autogenerated by Sphinx. Refer to documentation
62 | # for a list of supported languages.
63 | #
64 | # This is also used if you do content translation via gettext catalogs.
65 | # Usually you set "language" from the command line for these cases.
66 | language = 'zh_CN'
67 |
68 | # List of patterns, relative to source directory, that match files and
69 | # directories to ignore when looking for source files.
70 | # This pattern also affects html_static_path and html_extra_path.
71 | exclude_patterns = []
72 |
73 | # The name of the Pygments (syntax highlighting) style to use.
74 | pygments_style = None
75 |
76 |
77 | # -- Options for HTML output -------------------------------------------------
78 |
79 | # The theme to use for HTML and HTML Help pages. See the documentation for
80 | # a list of builtin themes.
81 | #
82 | #html_theme = 'alabaster'
83 | html_theme = 'sphinx_rtd_theme'
84 |
85 | # Theme options are theme-specific and customize the look and feel of a theme
86 | # further. For a list of options available for each theme, see the
87 | # documentation.
88 | #
89 | # html_theme_options = {}
90 |
91 | # Add any paths that contain custom static files (such as style sheets) here,
92 | # relative to this directory. They are copied after the builtin static files,
93 | # so a file named "default.css" will overwrite the builtin "default.css".
94 | html_static_path = ['_static']
95 |
96 | # Custom sidebar templates, must be a dictionary that maps document names
97 | # to template names.
98 | #
99 | # The default sidebars (for documents that don't match any pattern) are
100 | # defined by theme itself. Builtin themes are using these templates by
101 | # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
102 | # 'searchbox.html']``.
103 | #
104 | # html_sidebars = {}
105 |
106 |
107 | # -- Options for HTMLHelp output ---------------------------------------------
108 |
109 | # Output file base name for HTML help builder.
110 | htmlhelp_basename = 'poidoc'
111 |
112 |
113 | # -- Options for LaTeX output ------------------------------------------------
114 |
115 | latex_elements = {
116 | # The paper size ('letterpaper' or 'a4paper').
117 | #
118 | # 'papersize': 'letterpaper',
119 |
120 | # The font size ('10pt', '11pt' or '12pt').
121 | #
122 | # 'pointsize': '10pt',
123 |
124 | # Additional stuff for the LaTeX preamble.
125 | #
126 | # 'preamble': '',
127 |
128 | # Latex figure (float) alignment
129 | #
130 | # 'figure_align': 'htbp',
131 | }
132 |
133 | # Grouping the document tree into LaTeX files. List of tuples
134 | # (source start file, target name, title,
135 | # author, documentclass [howto, manual, or own class]).
136 | latex_documents = [
137 | (master_doc, 'poi.tex', u'POI Documentation',
138 | u'T5750', 'manual'),
139 | ]
140 |
141 |
142 | # -- Options for manual page output ------------------------------------------
143 |
144 | # One entry per manual page. List of tuples
145 | # (source start file, name, description, authors, manual section).
146 | man_pages = [
147 | (master_doc, 'poi', u'POI Documentation',
148 | [author], 1)
149 | ]
150 |
151 |
152 | # -- Options for Texinfo output ----------------------------------------------
153 |
154 | # Grouping the document tree into Texinfo files. List of tuples
155 | # (source start file, target name, title, author,
156 | # dir menu entry, description, category)
157 | texinfo_documents = [
158 | (master_doc, 'poi', u'POI Documentation',
159 | author, 'poi', 'One line description of project.',
160 | 'Miscellaneous'),
161 | ]
162 |
163 |
164 | # -- Options for Epub output -------------------------------------------------
165 |
166 | # Bibliographic Dublin Core info.
167 | epub_title = project
168 |
169 | # The unique identifier of the text. This can be a ISBN number
170 | # or the project homepage.
171 | #
172 | # epub_identifier = ''
173 |
174 | # A unique identification for the text.
175 | #
176 | # epub_uid = ''
177 |
178 | # A list of files that should not be packed into the epub file.
179 | epub_exclude_files = ['search.html']
180 |
--------------------------------------------------------------------------------
/doc/source/index.rst:
--------------------------------------------------------------------------------
1 | .. poi documentation master file, created by
2 | sphinx-quickstart on Sat Oct 5 08:38:13 2019.
3 | You can adapt this file completely to your liking, but it should at least
4 | contain the root `toctree` directive.
5 |
6 | POI Repositories
7 | ===============================
8 | Read and Write Excel file using Java and Apache POI, I hope this can help you.
9 |
10 | .. toctree::
11 | :maxdepth: 2
12 | :glob:
13 |
14 | install/index
15 | quick/index
--------------------------------------------------------------------------------
/doc/source/install/index.rst:
--------------------------------------------------------------------------------
1 | 安装运行
2 | ===============================
3 |
4 | .. toctree::
5 | :maxdepth: 2
6 | :numbered: 2
7 |
8 | installation
--------------------------------------------------------------------------------
/doc/source/install/installation.md:
--------------------------------------------------------------------------------
1 | # Installation
2 |
3 | ## 下载
4 | - [Java 8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
5 | - [Maven 3.x](http://maven.apache.org/download.cgi)
6 | - [Git 2.x](https://git-scm.com/downloads)
7 | - [Tomcat 8](https://tomcat.apache.org/download-80.cgi)
8 |
9 | ## 设置
10 | Windows中设置4个环境变量:`JAVA_HOME`、`CLASSPATH`、`M2_HOME`、`PATH`
11 |
12 | ### Java
13 | - `JAVA_HOME`: `path/jdk1.8.0_131`
14 | - `CLASSPATH`: `.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar`
15 |
16 | ### Maven
17 | - `M2_HOME`: `path/apache-maven-3.3.9`
18 | - 或者,设置IntelliJ IDEA 15 -> Settings -> Build Tools -> Maven -> Maven home directory
19 |
20 | ### Path
21 | - `PATH`: `%JAVA_HOME%\bin;%M2_HOME%\bin;%PATH%`
22 |
23 | ### Version
24 | - `java -version`
25 | - `javac -version`
26 | - `mvn -v`
27 | - `git --version`
28 |
29 | ## 运行
30 | ```
31 | git clone https://github.com/T5750/poi-repositories.git
32 | cd poi-repositories
33 | ```
34 |
35 | ### Embedded Tomcat
36 | ```
37 | mvn clean spring-boot:run
38 | ```
39 |
40 | ### Tomcat
41 | ```
42 | mvn clean package
43 | ```
44 | - 复制`target/poi.war`到`path/apache-tomcat-8.5.46/webapps`
45 | - 运行`path/apache-tomcat-8.5.46/bin/startup.bat`
46 | - [http://localhost:8080/poi](http://localhost:8080/poi)
47 |
48 | ### IDE
49 | - `PoiApplication`
--------------------------------------------------------------------------------
/doc/source/quick/index.rst:
--------------------------------------------------------------------------------
1 | 快速入门
2 | ===============================
3 |
4 | .. toctree::
5 | :maxdepth: 2
6 | :numbered: 2
7 |
8 | tutorial
--------------------------------------------------------------------------------
/doc/source/quick/tutorial.md:
--------------------------------------------------------------------------------
1 | # Tutorial
2 |
3 | ## Docs
4 | - [https://poix.readthedocs.io](https://poix.readthedocs.io)
5 |
6 | ## Getting Started
7 | 
8 |
9 | Step 1: Download
10 | ```
11 | git clone https://github.com/T5750/poi-repositories.git
12 | cd poi-repositories
13 | ```
14 |
15 | Step 2: Start Server
16 | ```
17 | docker-compose up -d
18 | # or
19 | mvn clean spring-boot:run
20 | ```
21 | [http://localhost:8080/poi](http://localhost:8080/poi)
22 |
23 | ### Tests
24 | - `TestReadExcel`, `TestReadExcelDemo`
25 | - `TestExportExcel`, `TestExportExcel2007`, `TestWriteExcelDemo`
26 | - `TestTemplate`, `TestExcelReplace`
27 | - `CalendarDemo`
28 | - `TestExcelFormulaDemo`, `TestExcelStylingDemo`, `TestAll`
29 |
30 | ### Runtime Environment
31 | - [Java 8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
32 | - [Spring Framework 5.x](https://spring.io/projects/spring-framework)
33 | - [Spring Boot 2.x](https://spring.io/projects/spring-boot)
34 | - [Derby 10.x](https://db.apache.org/derby/)
35 | - [Hibernate ORM 5.x](http://hibernate.org/orm)
36 | - [POI 5.x](https://poi.apache.org/download.html)
37 | - [Bootstrap 4.x](https://github.com/twbs/bootstrap)
38 | - [Docker 19.x](https://www.docker.com/)
39 |
40 | ### Classes
41 | 1. **HSSF, XSSF and XSSF classes**
42 |
43 | Apache POI main classes usually start with either **HSSF**, **XSSF** or **SXSSF**.
44 | - **HSSF** – is the POI Project’s pure Java implementation of the Excel ’97(-2007) file format. e.g. [HSSFWorkbook](https://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFWorkbook.html), [HSSFSheet](https://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFSheet.html).
45 | - **XSSF** – is the POI Project’s pure Java implementation of the Excel 2007 OOXML (.xlsx) file format. e.g. [XSSFWorkbook](https://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFWorkbook.html), [XSSFSheet](https://poi.apache.org/apidocs/org/apache/poi/xssf/usermodel/XSSFSheet.html).
46 | - **SXSSF** (since 3.8-beta3) – is an API-compatible streaming extension of XSSF to be used when very large spreadsheets have to be produced, and heap space is limited. e.g. [SXSSFWorkbook](https://poi.apache.org/apidocs/org/apache/poi/xssf/streaming/SXSSFWorkbook.html), [SXSSFSheet](https://poi.apache.org/apidocs/org/apache/poi/xssf/streaming/SXSSFSheet.html). SXSSF achieves its **low memory footprint by limiting access to the rows that are within a sliding window**, while XSSF gives access to all rows in the document.
47 |
48 | 2. **Row and Cell**
49 |
50 | Apart from above classes, [Row](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Row.html) and [Cell](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/Cell.html) are used to interact with a particular row and a particular cell in excel sheet.
51 |
52 | 3. **Style Classes**
53 |
54 | A wide range of classes like [CellStyle](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/CellStyle.html), [BuiltinFormats](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/BuiltinFormats.html), [ComparisonOperator](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/ComparisonOperator.html), [ConditionalFormattingRule](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/ConditionalFormattingRule.html), [FontFormatting](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/FontFormatting.html), [IndexedColors](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/IndexedColors.html), [PatternFormatting](https://poi.apache.org/apidocs/org/apache/poi/hssf/record/cf/PatternFormatting.html), [SheetConditionalFormatting](https://poi.apache.org/apidocs/org/apache/poi/ss/usermodel/SheetConditionalFormatting.html) etc. are used when you have to add formatting in a sheet, mostly based on some rules.
55 |
56 | 4. **FormulaEvaluator**
57 |
58 | Another useful class **FormulaEvaluator** is used to evaluate the formula cells in excel sheet.
59 |
60 | ### Write an excel file
61 | 1. Create a workbook
62 | 3. Create a sheet in workbook
63 | 4. Create a row in sheet
64 | 5. Add cells in sheet
65 | 6. Repeat step 3 and 4 to write more data
66 |
67 | ### Read an excel file
68 | 1. Create workbook instance from excel sheet
69 | 3. Get to the desired sheet
70 | 4. Increment row number
71 | 5. iterate over all cells in a row
72 | 6. repeat step 3 and 4 until all data is read
73 |
74 | ## Getting Help
75 | Having trouble with T5750's POI? We’d like to help!
76 | - Ask a question on [CSDN](https://blog.csdn.net/evangel_z/article/details/7332535).
77 | - Report bugs at [https://github.com/T5750/poi/issues](https://github.com/T5750/poi/issues).
78 |
79 | ## Branch
80 | - View POI 3.x branch at [https://github.com/T5750/poi/tree/poi3](https://github.com/T5750/poi/tree/poi3).
81 | - View servlet branch at [https://github.com/T5750/poi/tree/servlet](https://github.com/T5750/poi/tree/servlet).
82 |
83 | ## References
84 | - [Java POI导出EXCEL经典实现 Java导出Excel弹出下载框](https://blog.csdn.net/evangel_z/article/details/7332535)
85 | - [Java POI读取Office excel (2003,2007)及相关jar包](https://blog.csdn.net/evangel_z/article/details/7312050)
86 | - [HSSF and XSSF Examples](http://poi.apache.org/spreadsheet/examples.html)
87 | - [Apache POI – Read and Write Excel File in Java](https://howtodoinjava.com/library/readingwriting-excel-files-in-java-poi-tutorial/)
88 |
89 | ## License
90 | This project is Open Source software released under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0.html).
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3'
2 | services:
3 | poi:
4 | restart: always
5 | image: t5750/poi
6 | container_name: poi
7 | hostname: poi
8 | ports:
9 | - 8080:8080
10 | environment:
11 | TZ: Asia/Shanghai
12 | volumes:
13 | - /etc/localtime:/etc/localtime:ro
14 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 | t5750
7 | poi
8 | ${revision}
9 | Java POI
10 | Java POI
11 | jar
12 |
13 | 1.2
14 | UTF-8
15 | 1.8
16 | 5.2.2
17 | 2.7.1
18 | 5.8.27
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | org.springframework.boot
27 | spring-boot-dependencies
28 | ${spring-boot-version}
29 | pom
30 | import
31 |
32 |
33 |
34 |
35 |
36 | org.apache.poi
37 | poi
38 | ${poi.version}
39 |
40 |
41 | org.apache.poi
42 | poi-ooxml
43 | ${poi.version}
44 |
45 |
46 | org.springframework.boot
47 | spring-boot-starter-web
48 |
49 |
50 | org.springframework.boot
51 | spring-boot-starter-validation
52 |
53 |
54 | org.springframework.boot
55 | spring-boot-starter-test
56 | test
57 |
58 |
59 | org.springframework.boot
60 | spring-boot-starter-data-jpa
61 |
62 |
63 | org.springframework.boot
64 | spring-boot-starter-thymeleaf
65 |
66 |
67 | org.apache.derby
68 | derby
69 |
70 |
71 | cn.hutool
72 | hutool-poi
73 | ${hutool.version}
74 |
75 |
76 | junit
77 | junit
78 | test
79 |
80 |
81 |
82 | ${project.artifactId}
83 |
84 |
85 | org.apache.maven.plugins
86 | maven-compiler-plugin
87 | 3.1
88 |
89 | ${java.version}
90 | ${java.version}
91 | ${project.build.sourceEncoding}
92 |
93 |
94 |
95 | org.springframework.boot
96 | spring-boot-maven-plugin
97 | ${spring-boot-version}
98 |
99 |
100 |
101 | repackage
102 |
103 |
104 |
105 |
106 |
107 | org.apache.maven.plugins
108 | maven-jar-plugin
109 | 3.0.2
110 |
111 |
112 | org.apache.maven.plugins
113 | maven-surefire-plugin
114 |
115 | true
116 |
117 |
118 |
138 |
139 |
140 |
--------------------------------------------------------------------------------
/readthedocs.yaml:
--------------------------------------------------------------------------------
1 | # .readthedocs.yaml
2 | # Read the Docs configuration file
3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4 |
5 | # Required
6 | version: 2
7 |
8 | # Set the version of Python and other tools you might need
9 | build:
10 | os: ubuntu-22.04
11 | tools:
12 | python: "3.11"
13 | # You can also specify other tool versions:
14 | # nodejs: "19"
15 | # rust: "1.64"
16 | # golang: "1.19"
17 |
18 | # Build documentation in the docs/ directory with Sphinx
19 | sphinx:
20 | configuration: doc/source/conf.py
21 |
22 | # Build documentation with MkDocs
23 | #mkdocs:
24 | # configuration: mkdocs.yml
25 |
26 | # Optionally build your docs in additional formats such as PDF and ePub
27 | formats: []
28 |
29 | # Optionally set the version of Python and requirements required to build your docs
30 | python:
31 | install:
32 | - requirements: doc/requirements.txt
--------------------------------------------------------------------------------
/src/main/java/t5750/poi/PoiApplication.java:
--------------------------------------------------------------------------------
1 | package t5750.poi;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
6 | import t5750.poi.util.Globals;
7 |
8 | import java.io.File;
9 |
10 | @SpringBootApplication
11 | public class PoiApplication extends SpringBootServletInitializer {
12 | public static void main(String[] args) {
13 | File file = new File(Globals.DOC_PATH);
14 | if (!file.exists()) {
15 | file.mkdirs();
16 | }
17 | SpringApplication.run(PoiApplication.class, args);
18 | }
19 | }
--------------------------------------------------------------------------------
/src/main/java/t5750/poi/command/ExcelReplaceDataVO.java:
--------------------------------------------------------------------------------
1 | package t5750.poi.command;
2 |
3 | /**
4 | * Excel替换内容存储对象
5 | */
6 | public class ExcelReplaceDataVO {
7 | private int row;// Excel单元格行
8 | private int column;// Excel单元格列
9 | private String key;// 替换的关键字
10 | private String value;// 替换的文本
11 |
12 | public int getRow() {
13 | return row;
14 | }
15 |
16 | public void setRow(int row) {
17 | this.row = row;
18 | }
19 |
20 | public int getColumn() {
21 | return column;
22 | }
23 |
24 | public void setColumn(int column) {
25 | this.column = column;
26 | }
27 |
28 | public String getKey() {
29 | return key;
30 | }
31 |
32 | public void setKey(String key) {
33 | this.key = key;
34 | }
35 |
36 | public String getValue() {
37 | return value;
38 | }
39 |
40 | public void setValue(String value) {
41 | this.value = value;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/t5750/poi/command/ProductForm.java:
--------------------------------------------------------------------------------
1 | package t5750.poi.command;
2 |
3 | import java.math.BigDecimal;
4 |
5 | import org.hibernate.validator.constraints.NotBlank;
6 |
7 | public class ProductForm {
8 | private Long id;
9 | @NotBlank
10 | private String description;
11 | private BigDecimal price;
12 | private String imageUrl;
13 |
14 | public Long getId() {
15 | return id;
16 | }
17 |
18 | public void setId(Long id) {
19 | this.id = id;
20 | }
21 |
22 | public String getDescription() {
23 | return description;
24 | }
25 |
26 | public void setDescription(String description) {
27 | this.description = description;
28 | }
29 |
30 | public BigDecimal getPrice() {
31 | return price;
32 | }
33 |
34 | public void setPrice(BigDecimal price) {
35 | this.price = price;
36 | }
37 |
38 | public String getImageUrl() {
39 | return imageUrl;
40 | }
41 |
42 | public void setImageUrl(String imageUrl) {
43 | this.imageUrl = imageUrl;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/t5750/poi/config/RestTemplateConfig.java:
--------------------------------------------------------------------------------
1 | package t5750.poi.config;
2 |
3 | import org.springframework.context.annotation.Bean;
4 | import org.springframework.context.annotation.Configuration;
5 | import org.springframework.web.client.RestTemplate;
6 |
7 | @Configuration
8 | public class RestTemplateConfig {
9 | @Bean
10 | public RestTemplate getRestTemplate() {
11 | return new RestTemplate();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/t5750/poi/controller/ExcelController.java:
--------------------------------------------------------------------------------
1 | package t5750.poi.controller;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.io.InputStream;
6 | import java.util.ArrayList;
7 | import java.util.LinkedHashMap;
8 | import java.util.List;
9 | import java.util.Map;
10 |
11 | import javax.servlet.http.HttpServletResponse;
12 |
13 | import org.springframework.beans.factory.annotation.Autowired;
14 | import org.springframework.core.io.ClassPathResource;
15 | import org.springframework.core.io.Resource;
16 | import org.springframework.web.bind.annotation.*;
17 |
18 | import t5750.poi.domain.SheetDTO;
19 | import t5750.poi.service.ExcelService;
20 | import t5750.poi.util.Globals;
21 | import t5750.poi.util.HuExcelUtil;
22 |
23 | @RestController
24 | @RequestMapping("/excel")
25 | public class ExcelController {
26 | @Autowired
27 | private ExcelService excelService;
28 | @Autowired
29 | private HttpServletResponse response;
30 |
31 | @RequestMapping(value = "/read/{fileName}", method = RequestMethod.GET)
32 | public List read(@PathVariable String fileName) throws IOException {
33 | Resource resource = new ClassPathResource(
34 | Globals.DOC + File.separator + fileName + Globals.SUFFIX_XLS);
35 | InputStream is = resource.getInputStream();
36 | List> list = excelService.readExcel(is,
37 | Globals.SUFFIX_XLS);
38 | return list;
39 | }
40 |
41 | @RequestMapping(value = "/export/{fileName}", method = RequestMethod.GET)
42 | public String export(@PathVariable String fileName) throws IOException {
43 | String docsPath = excelService.export2003(fileName, response);
44 | return docsPath;
45 | }
46 |
47 | @RequestMapping(value = "/export2007/{fileName}", method = RequestMethod.GET)
48 | public String export2007(@PathVariable String fileName) throws IOException {
49 | String docsPath = excelService.export2007(fileName, response);
50 | return docsPath;
51 | }
52 |
53 | @RequestMapping(value = "/template/{fileName}", method = RequestMethod.GET)
54 | public String template(@PathVariable String fileName) throws IOException {
55 | String docsPath = excelService.template(fileName, response);
56 | return docsPath;
57 | }
58 |
59 | @RequestMapping(value = "/replace/{fileName}", method = RequestMethod.GET)
60 | public String replace(@PathVariable String fileName) throws IOException {
61 | String docsPath = excelService.replace(fileName, response);
62 | return docsPath;
63 | }
64 |
65 | /**
66 | * 导多个Sheet页
67 | */
68 | @ResponseBody
69 | @RequestMapping("/multipleSheet")
70 | public void multipleSheet(HttpServletResponse response) {
71 | List