Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Laubin729
easyexcel
提交
c7138ecf
E
easyexcel
项目概览
Laubin729
/
easyexcel
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
easyexcel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c7138ecf
编写于
2月 28, 2018
作者:
J
jipengfei.jpf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改代码结构,增加可维护性
上级
781150b5
变更
34
隐藏空白更改
内联
并排
Showing
34 changed file
with
84 addition
and
190 deletion
+84
-190
problem.md
problem.md
+7
-7
src/main/java/com/alibaba/excel/ExcelReader.java
src/main/java/com/alibaba/excel/ExcelReader.java
+4
-4
src/main/java/com/alibaba/excel/parameter/AnalysisParam.java
src/main/java/com/alibaba/excel/parameter/AnalysisParam.java
+0
-59
src/main/java/com/alibaba/excel/parameter/ExcelWriteParam.java
...ain/java/com/alibaba/excel/parameter/ExcelWriteParam.java
+0
-46
src/main/java/com/alibaba/excel/read/BaseSaxAnalyser.java
src/main/java/com/alibaba/excel/read/BaseSaxAnalyser.java
+5
-5
src/main/java/com/alibaba/excel/read/ExcelAnalyser.java
src/main/java/com/alibaba/excel/read/ExcelAnalyser.java
+2
-2
src/main/java/com/alibaba/excel/read/ExcelAnalyserImpl.java
src/main/java/com/alibaba/excel/read/ExcelAnalyserImpl.java
+5
-5
src/main/java/com/alibaba/excel/read/SaxAnalyserV03.java
src/main/java/com/alibaba/excel/read/SaxAnalyserV03.java
+4
-5
src/main/java/com/alibaba/excel/read/SaxAnalyserV07.java
src/main/java/com/alibaba/excel/read/SaxAnalyserV07.java
+6
-6
src/main/java/com/alibaba/excel/read/context/AnalysisContext.java
.../java/com/alibaba/excel/read/context/AnalysisContext.java
+3
-3
src/main/java/com/alibaba/excel/read/context/AnalysisContextImpl.java
...a/com/alibaba/excel/read/context/AnalysisContextImpl.java
+3
-3
src/main/java/com/alibaba/excel/read/event/AnalysisEventListener.java
...a/com/alibaba/excel/read/event/AnalysisEventListener.java
+5
-5
src/main/java/com/alibaba/excel/read/event/AnalysisEventRegisterCenter.java
...alibaba/excel/read/event/AnalysisEventRegisterCenter.java
+1
-1
src/main/java/com/alibaba/excel/read/event/OneRowAnalysisFinishEvent.java
...m/alibaba/excel/read/event/OneRowAnalysisFinishEvent.java
+1
-1
src/main/java/com/alibaba/excel/read/exception/ExcelAnalysisException.java
.../alibaba/excel/read/exception/ExcelAnalysisException.java
+1
-1
src/main/java/com/alibaba/excel/read/modelbuild/ModelBuildEventListener.java
...libaba/excel/read/modelbuild/ModelBuildEventListener.java
+4
-4
src/main/java/com/alibaba/excel/read/v07/RowHandler.java
src/main/java/com/alibaba/excel/read/v07/RowHandler.java
+10
-10
src/main/java/com/alibaba/excel/read/v07/XMLTempFile.java
src/main/java/com/alibaba/excel/read/v07/XMLTempFile.java
+1
-1
src/main/java/com/alibaba/excel/read/v07/XmlParserFactory.java
...ain/java/com/alibaba/excel/read/v07/XmlParserFactory.java
+1
-1
src/main/java/com/alibaba/excel/util/ExcelXmlConstants.java
src/main/java/com/alibaba/excel/util/ExcelXmlConstants.java
+1
-1
src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java
src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java
+2
-2
src/main/java/com/alibaba/excel/write/context/GenerateContext.java
...java/com/alibaba/excel/write/context/GenerateContext.java
+2
-2
src/main/java/com/alibaba/excel/write/context/GenerateContextImpl.java
.../com/alibaba/excel/write/context/GenerateContextImpl.java
+1
-1
src/main/java/com/alibaba/excel/write/exception/ExcelGenerateException.java
...alibaba/excel/write/exception/ExcelGenerateException.java
+1
-1
src/test/java/function/listener/ExcelListener.java
src/test/java/function/listener/ExcelListener.java
+2
-2
src/test/java/function/read/ExelAllDataTypeTest.java
src/test/java/function/read/ExelAllDataTypeTest.java
+1
-1
src/test/java/function/read/NumTest3.java
src/test/java/function/read/NumTest3.java
+1
-1
src/test/java/function/read/ReadSheets.java
src/test/java/function/read/ReadSheets.java
+1
-1
src/test/java/function/read/XLSX2007FunctionTest.java
src/test/java/function/read/XLSX2007FunctionTest.java
+1
-1
src/test/java/function/write/ExcelWriteTest1.java
src/test/java/function/write/ExcelWriteTest1.java
+1
-1
src/test/java/read/v03/XLS2003FunctionTest.java
src/test/java/read/v03/XLS2003FunctionTest.java
+1
-1
src/test/java/read/v07/Read2007Xlsx.java
src/test/java/read/v07/Read2007Xlsx.java
+2
-2
src/test/java/read/v07/listener/Excel2007NoJavaModelAnalysisListener.java
...ad/v07/listener/Excel2007NoJavaModelAnalysisListener.java
+2
-2
src/test/java/read/v07/listener/Excel2007WithJavaModelAnalysisListener.java
.../v07/listener/Excel2007WithJavaModelAnalysisListener.java
+2
-2
未找到文件。
problem.md
浏览文件 @
c7138ecf
...
...
@@ -31,7 +31,7 @@ java.lang.NullPointerException
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:656)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:677)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:83)
at com.alibaba.excel.context.GenerateContextImpl.buildCurrentSheet(GenerateContextImpl.java:93)
at com.alibaba.excel.
write.
context.GenerateContextImpl.buildCurrentSheet(GenerateContextImpl.java:93)
at com.alibaba.excel.write.ExcelBuilderImpl.addContent(ExcelBuilderImpl.java:53)
at com.alibaba.excel.ExcelWriter.write(ExcelWriter.java:44)
```
...
...
@@ -51,9 +51,9 @@ org.apache.poi.openxml4j.exceptions.OLE2NotOfficeXmlFileException: The supplied
at org.apache.poi.openxml4j.opc.internal.ZipHelper.openZipStream(ZipHelper.java:229)
at org.apache.poi.openxml4j.opc.ZipPackage.<init>(ZipPackage.java:97)
at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:342)
at com.alibaba.excel.
analysis
.v07.XlsxSaxAnalyser.<init>(XlsxSaxAnalyser.java:46)
at com.alibaba.excel.
analysis
.ExcelAnalyserImpl.getSaxAnalyser(ExcelAnalyserImpl.java:30)
at com.alibaba.excel.
analysis
.ExcelAnalyserImpl.analysis(ExcelAnalyserImpl.java:51)
at com.alibaba.excel.
read
.v07.XlsxSaxAnalyser.<init>(XlsxSaxAnalyser.java:46)
at com.alibaba.excel.
read
.ExcelAnalyserImpl.getSaxAnalyser(ExcelAnalyserImpl.java:30)
at com.alibaba.excel.
read
.ExcelAnalyserImpl.analysis(ExcelAnalyserImpl.java:51)
at com.alibaba.excel.ExcelReader.read(ExcelReader.java:55)
at read.v07.Read2007Xlsx.noModel(Read2007Xlsx.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
...
@@ -100,9 +100,9 @@ org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appear
at org.apache.poi.poifs.storage.HeaderBlock.<init>(HeaderBlock.java:140)
at org.apache.poi.poifs.filesystem.NPOIFSFileSystem.<init>(NPOIFSFileSystem.java:302)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:87)
at com.alibaba.excel.
analysis
.v03.XlsSaxAnalyser.<init>(XlsSaxAnalyser.java:55)
at com.alibaba.excel.
analysis
.ExcelAnalyserImpl.getSaxAnalyser(ExcelAnalyserImpl.java:27)
at com.alibaba.excel.
analysis
.ExcelAnalyserImpl.analysis(ExcelAnalyserImpl.java:51)
at com.alibaba.excel.
read
.v03.XlsSaxAnalyser.<init>(XlsSaxAnalyser.java:55)
at com.alibaba.excel.
read
.ExcelAnalyserImpl.getSaxAnalyser(ExcelAnalyserImpl.java:27)
at com.alibaba.excel.
read
.ExcelAnalyserImpl.analysis(ExcelAnalyserImpl.java:51)
at com.alibaba.excel.ExcelReader.read(ExcelReader.java:55)
at read.v03.XLS2003FunctionTest.testExcel2003NoModel(XLS2003FunctionTest.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
...
src/main/java/com/alibaba/excel/ExcelReader.java
浏览文件 @
c7138ecf
...
...
@@ -3,10 +3,10 @@ package com.alibaba.excel;
import
java.io.InputStream
;
import
java.util.List
;
import
com.alibaba.excel.
analysis
.ExcelAnalyser
;
import
com.alibaba.excel.
analysis
.ExcelAnalyserImpl
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read
.ExcelAnalyser
;
import
com.alibaba.excel.
read
.ExcelAnalyserImpl
;
import
com.alibaba.excel.
read.
context.AnalysisContext
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
...
...
src/main/java/com/alibaba/excel/parameter/AnalysisParam.java
已删除
100644 → 0
浏览文件 @
781150b5
package
com.alibaba.excel.parameter
;
import
java.io.InputStream
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
/**
* 方便使用废弃Excel解析时候入参,直接将ExcelTypeEnum、InputStream、customContent传入{@link com.alibaba.excel.ExcelReader}的构造器
*
* @author jipengfei
*/
@Deprecated
public
class
AnalysisParam
{
/**
* @see ExcelTypeEnum
*/
private
ExcelTypeEnum
excelTypeEnum
;
/**
* file in
*/
private
InputStream
in
;
/**
* user defined param to listener use
*/
private
Object
customContent
;
public
AnalysisParam
(
InputStream
in
,
ExcelTypeEnum
excelTypeEnum
,
Object
customContent
)
{
this
.
in
=
in
;
this
.
excelTypeEnum
=
excelTypeEnum
;
this
.
customContent
=
customContent
;
}
public
ExcelTypeEnum
getExcelTypeEnum
()
{
return
excelTypeEnum
;
}
public
void
setExcelTypeEnum
(
ExcelTypeEnum
excelTypeEnum
)
{
this
.
excelTypeEnum
=
excelTypeEnum
;
}
public
Object
getCustomContent
()
{
return
customContent
;
}
public
void
setCustomContent
(
Object
customContent
)
{
this
.
customContent
=
customContent
;
}
public
InputStream
getIn
()
{
return
in
;
}
public
void
setIn
(
InputStream
in
)
{
this
.
in
=
in
;
}
}
src/main/java/com/alibaba/excel/parameter/ExcelWriteParam.java
已删除
100644 → 0
浏览文件 @
781150b5
package
com.alibaba.excel.parameter
;
import
java.io.OutputStream
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
/**
* 为方便使用废弃该入参。直接将outputStream,type传入{@link com.alibaba.excel.ExcelWriter}的构造器即可
*
* @author jipengfei
*/
@Deprecated
public
class
ExcelWriteParam
{
/**
* 文件输出流
*/
private
OutputStream
outputStream
;
/**
* Excel类型
*/
private
ExcelTypeEnum
type
;
public
ExcelWriteParam
(
OutputStream
outputStream
,
ExcelTypeEnum
type
)
{
this
.
outputStream
=
outputStream
;
this
.
type
=
type
;
}
public
OutputStream
getOutputStream
()
{
return
outputStream
;
}
public
void
setOutputStream
(
OutputStream
outputStream
)
{
this
.
outputStream
=
outputStream
;
}
public
ExcelTypeEnum
getType
()
{
return
type
;
}
public
void
setType
(
ExcelTypeEnum
type
)
{
this
.
type
=
type
;
}
}
src/main/java/com/alibaba/excel/
analysis
/BaseSaxAnalyser.java
→
src/main/java/com/alibaba/excel/
read
/BaseSaxAnalyser.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.
analysis
;
package
com.alibaba.excel.
read
;
import
java.io.InputStream
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.event.AnalysisEventRegisterCenter
;
import
com.alibaba.excel.event.OneRowAnalysisFinishEvent
;
import
com.alibaba.excel.
read.
context.AnalysisContext
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
event.AnalysisEventRegisterCenter
;
import
com.alibaba.excel.
read.
event.OneRowAnalysisFinishEvent
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
...
...
src/main/java/com/alibaba/excel/
analysis
/ExcelAnalyser.java
→
src/main/java/com/alibaba/excel/
read
/ExcelAnalyser.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.
analysis
;
package
com.alibaba.excel.
read
;
import
java.io.InputStream
;
import
java.util.List
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
...
...
src/main/java/com/alibaba/excel/
analysis
/ExcelAnalyserImpl.java
→
src/main/java/com/alibaba/excel/
read
/ExcelAnalyserImpl.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.
analysis
;
package
com.alibaba.excel.
read
;
import
java.io.InputStream
;
import
java.util.List
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.context.AnalysisContextImpl
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
context.AnalysisContext
;
import
com.alibaba.excel.
read.
context.AnalysisContextImpl
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.modelbuild.ModelBuildEventListener
;
import
com.alibaba.excel.
read.
modelbuild.ModelBuildEventListener
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
/**
...
...
src/main/java/com/alibaba/excel/
analysis
/SaxAnalyserV03.java
→
src/main/java/com/alibaba/excel/
read
/SaxAnalyserV03.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.
analysis
;
package
com.alibaba.excel.
read
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.alibaba.excel.analysis.BaseSaxAnalyser
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.OneRowAnalysisFinishEvent
;
import
com.alibaba.excel.exception.ExcelAnalysisException
;
import
com.alibaba.excel.read.context.AnalysisContext
;
import
com.alibaba.excel.read.event.OneRowAnalysisFinishEvent
;
import
com.alibaba.excel.read.exception.ExcelAnalysisException
;
import
com.alibaba.excel.metadata.Sheet
;
import
org.apache.poi.hssf.eventusermodel.EventWorkbookBuilder
;
...
...
src/main/java/com/alibaba/excel/
analysis
/SaxAnalyserV07.java
→
src/main/java/com/alibaba/excel/
read
/SaxAnalyserV07.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.
analysis
;
package
com.alibaba.excel.
read
;
import
java.io.File
;
import
java.io.FileInputStream
;
...
...
@@ -13,11 +13,11 @@ import java.util.Locale;
import
javax.xml.parsers.ParserConfigurationException
;
import
com.alibaba.excel.
analysis
.v07.RowHandler
;
import
com.alibaba.excel.
analysis
.v07.XmlParserFactory
;
import
com.alibaba.excel.
analysis
.v07.XMLTempFile
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.exception.ExcelAnalysisException
;
import
com.alibaba.excel.
read
.v07.RowHandler
;
import
com.alibaba.excel.
read
.v07.XmlParserFactory
;
import
com.alibaba.excel.
read
.v07.XMLTempFile
;
import
com.alibaba.excel.
read.
context.AnalysisContext
;
import
com.alibaba.excel.
read.
exception.ExcelAnalysisException
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.util.FileUtil
;
...
...
src/main/java/com/alibaba/excel/context/AnalysisContext.java
→
src/main/java/com/alibaba/excel/
read/
context/AnalysisContext.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.context
;
package
com.alibaba.excel.
read.
context
;
import
java.io.InputStream
;
import
java.util.List
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.BaseRowModel
;
import
com.alibaba.excel.metadata.ExcelHeadProperty
;
import
com.alibaba.excel.metadata.Sheet
;
...
...
@@ -26,7 +26,7 @@ public interface AnalysisContext {
/**
* 返回当前Sheet
*
* @return current
analysis
sheet
* @return current
read
sheet
*/
Sheet
getCurrentSheet
();
...
...
src/main/java/com/alibaba/excel/context/AnalysisContextImpl.java
→
src/main/java/com/alibaba/excel/
read/
context/AnalysisContextImpl.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.context
;
package
com.alibaba.excel.
read.
context
;
import
java.io.InputStream
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.exception.ExcelAnalysisException
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
exception.ExcelAnalysisException
;
import
com.alibaba.excel.metadata.BaseRowModel
;
import
com.alibaba.excel.metadata.ExcelHeadProperty
;
import
com.alibaba.excel.metadata.Sheet
;
...
...
src/main/java/com/alibaba/excel/event/AnalysisEventListener.java
→
src/main/java/com/alibaba/excel/
read/
event/AnalysisEventListener.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.event
;
package
com.alibaba.excel.
read.
event
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.
read.
context.AnalysisContext
;
/**
* 监听Excel解析每行数据
...
...
@@ -14,15 +14,15 @@ import com.alibaba.excel.context.AnalysisContext;
public
abstract
class
AnalysisEventListener
<
T
>
{
/**
* when
analysis
one row trigger invoke function
* when
read
one row trigger invoke function
*
* @param object one row data
* @param context
analysis
context
* @param context
read
context
*/
public
abstract
void
invoke
(
T
object
,
AnalysisContext
context
);
/**
* if have something to do after all
analysis
* if have something to do after all
read
*
* @param context context
*/
...
...
src/main/java/com/alibaba/excel/event/AnalysisEventRegisterCenter.java
→
src/main/java/com/alibaba/excel/
read/
event/AnalysisEventRegisterCenter.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.event
;
package
com.alibaba.excel.
read.
event
;
/**
...
...
src/main/java/com/alibaba/excel/event/OneRowAnalysisFinishEvent.java
→
src/main/java/com/alibaba/excel/
read/
event/OneRowAnalysisFinishEvent.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.event
;
package
com.alibaba.excel.
read.
event
;
/**
* @author jipengfei
...
...
src/main/java/com/alibaba/excel/exception/ExcelAnalysisException.java
→
src/main/java/com/alibaba/excel/
read/
exception/ExcelAnalysisException.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.exception
;
package
com.alibaba.excel.
read.
exception
;
/**
* Excel解析时候封装的异常
...
...
src/main/java/com/alibaba/excel/modelbuild/ModelBuildEventListener.java
→
src/main/java/com/alibaba/excel/
read/
modelbuild/ModelBuildEventListener.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.modelbuild
;
package
com.alibaba.excel.
read.
modelbuild
;
import
java.util.List
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.exception.ExcelGenerateException
;
import
com.alibaba.excel.
read.
context.AnalysisContext
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.
write.
exception.ExcelGenerateException
;
import
com.alibaba.excel.metadata.ExcelColumnProperty
;
import
com.alibaba.excel.metadata.ExcelHeadProperty
;
import
com.alibaba.excel.util.TypeUtil
;
...
...
src/main/java/com/alibaba/excel/
analysis
/v07/RowHandler.java
→
src/main/java/com/alibaba/excel/
read
/v07/RowHandler.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.
analysis
.v07
;
package
com.alibaba.excel.
read
.v07
;
import
java.util.Arrays
;
import
java.util.List
;
import
com.alibaba.excel.annotation.FieldType
;
import
com.alibaba.excel.
constant
.ExcelXmlConstants
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventRegisterCenter
;
import
com.alibaba.excel.event.OneRowAnalysisFinishEvent
;
import
com.alibaba.excel.
util
.ExcelXmlConstants
;
import
com.alibaba.excel.
read.
context.AnalysisContext
;
import
com.alibaba.excel.
read.
event.AnalysisEventRegisterCenter
;
import
com.alibaba.excel.
read.
event.OneRowAnalysisFinishEvent
;
import
com.alibaba.excel.util.PositionUtils
;
import
org.apache.poi.xssf.model.SharedStringsTable
;
...
...
@@ -15,11 +15,11 @@ import org.xml.sax.Attributes;
import
org.xml.sax.SAXException
;
import
org.xml.sax.helpers.DefaultHandler
;
import
static
com
.
alibaba
.
excel
.
constant
.
ExcelXmlConstants
.
CELL_VALUE_TAG
;
import
static
com
.
alibaba
.
excel
.
constant
.
ExcelXmlConstants
.
CELL_VALUE_TAG_1
;
import
static
com
.
alibaba
.
excel
.
constant
.
ExcelXmlConstants
.
DIMENSION
;
import
static
com
.
alibaba
.
excel
.
constant
.
ExcelXmlConstants
.
DIMENSION_REF
;
import
static
com
.
alibaba
.
excel
.
constant
.
ExcelXmlConstants
.
ROW_TAG
;
import
static
com
.
alibaba
.
excel
.
util
.
ExcelXmlConstants
.
CELL_VALUE_TAG
;
import
static
com
.
alibaba
.
excel
.
util
.
ExcelXmlConstants
.
CELL_VALUE_TAG_1
;
import
static
com
.
alibaba
.
excel
.
util
.
ExcelXmlConstants
.
DIMENSION
;
import
static
com
.
alibaba
.
excel
.
util
.
ExcelXmlConstants
.
DIMENSION_REF
;
import
static
com
.
alibaba
.
excel
.
util
.
ExcelXmlConstants
.
ROW_TAG
;
/**
* @author jipengfei
...
...
src/main/java/com/alibaba/excel/
analysis
/v07/XMLTempFile.java
→
src/main/java/com/alibaba/excel/
read
/v07/XMLTempFile.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.
analysis
.v07
;
package
com.alibaba.excel.
read
.v07
;
import
java.io.File
;
import
java.security.SecureRandom
;
...
...
src/main/java/com/alibaba/excel/
analysis
/v07/XmlParserFactory.java
→
src/main/java/com/alibaba/excel/
read
/v07/XmlParserFactory.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.
analysis
.v07
;
package
com.alibaba.excel.
read
.v07
;
import
java.io.IOException
;
import
java.io.InputStream
;
...
...
src/main/java/com/alibaba/excel/
constant
/ExcelXmlConstants.java
→
src/main/java/com/alibaba/excel/
util
/ExcelXmlConstants.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.
constant
;
package
com.alibaba.excel.
util
;
/**
* @author jipengfei
...
...
src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java
浏览文件 @
c7138ecf
...
...
@@ -4,8 +4,8 @@ import java.io.IOException;
import
java.io.OutputStream
;
import
java.util.List
;
import
com.alibaba.excel.context.GenerateContext
;
import
com.alibaba.excel.context.GenerateContextImpl
;
import
com.alibaba.excel.
write.
context.GenerateContext
;
import
com.alibaba.excel.
write.
context.GenerateContextImpl
;
import
com.alibaba.excel.metadata.ExcelColumnProperty
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.metadata.Table
;
...
...
src/main/java/com/alibaba/excel/context/GenerateContext.java
→
src/main/java/com/alibaba/excel/
write/
context/GenerateContext.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.context
;
package
com.alibaba.excel.
write.
context
;
import
java.io.OutputStream
;
...
...
@@ -17,7 +17,7 @@ public interface GenerateContext {
/**
* 返回当前sheet
* @return current
analysis
sheet
* @return current
read
sheet
*/
Sheet
getCurrentSheet
();
...
...
src/main/java/com/alibaba/excel/context/GenerateContextImpl.java
→
src/main/java/com/alibaba/excel/
write/
context/GenerateContextImpl.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.context
;
package
com.alibaba.excel.
write.
context
;
import
java.io.OutputStream
;
import
java.util.List
;
...
...
src/main/java/com/alibaba/excel/exception/ExcelGenerateException.java
→
src/main/java/com/alibaba/excel/
write/
exception/ExcelGenerateException.java
浏览文件 @
c7138ecf
package
com.alibaba.excel.exception
;
package
com.alibaba.excel.
write.
exception
;
/**
* 生成Excel封装的异常
...
...
src/test/java/function/listener/ExcelListener.java
浏览文件 @
c7138ecf
...
...
@@ -9,8 +9,8 @@ import java.util.ArrayList;
import
java.util.List
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
context.AnalysisContext
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
/**
...
...
src/test/java/function/read/ExelAllDataTypeTest.java
浏览文件 @
c7138ecf
...
...
@@ -4,7 +4,7 @@ import java.io.IOException;
import
java.io.InputStream
;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
...
...
src/test/java/function/read/NumTest3.java
浏览文件 @
c7138ecf
...
...
@@ -4,7 +4,7 @@ import java.io.IOException;
import
java.io.InputStream
;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
...
...
src/test/java/function/read/ReadSheets.java
浏览文件 @
c7138ecf
...
...
@@ -7,7 +7,7 @@ import java.util.List;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
...
...
src/test/java/function/read/XLSX2007FunctionTest.java
浏览文件 @
c7138ecf
...
...
@@ -4,7 +4,7 @@ import java.io.IOException;
import
java.io.InputStream
;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
...
...
src/test/java/function/write/ExcelWriteTest1.java
浏览文件 @
c7138ecf
...
...
@@ -10,7 +10,7 @@ import java.util.List;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
...
...
src/test/java/read/v03/XLS2003FunctionTest.java
浏览文件 @
c7138ecf
...
...
@@ -4,7 +4,7 @@ import java.io.IOException;
import
java.io.InputStream
;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
...
...
src/test/java/read/v07/Read2007Xlsx.java
浏览文件 @
c7138ecf
...
...
@@ -7,8 +7,8 @@ import java.util.Collections;
import
java.util.List
;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
context.AnalysisContext
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.Sheet
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
...
...
src/test/java/read/v07/listener/Excel2007NoJavaModelAnalysisListener.java
浏览文件 @
c7138ecf
...
...
@@ -4,8 +4,8 @@ import java.util.ArrayList;
import
java.util.List
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
context.AnalysisContext
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
/**
* @author jipengfei
...
...
src/test/java/read/v07/listener/Excel2007WithJavaModelAnalysisListener.java
浏览文件 @
c7138ecf
...
...
@@ -4,8 +4,8 @@ import java.util.ArrayList;
import
java.util.List
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.
read.
context.AnalysisContext
;
import
com.alibaba.excel.
read.
event.AnalysisEventListener
;
import
com.alibaba.excel.metadata.BaseRowModel
;
import
com.alibaba.excel.metadata.Sheet
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录