diff --git a/problem.md b/problem.md index 2d9c70c..9244148 100644 --- a/problem.md +++ b/problem.md @@ -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.(ZipPackage.java:97) at org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:342) - at com.alibaba.excel.analysis.v07.XlsxSaxAnalyser.(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.(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.(HeaderBlock.java:140) at org.apache.poi.poifs.filesystem.NPOIFSFileSystem.(NPOIFSFileSystem.java:302) at org.apache.poi.poifs.filesystem.POIFSFileSystem.(POIFSFileSystem.java:87) - at com.alibaba.excel.analysis.v03.XlsSaxAnalyser.(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.(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) diff --git a/src/main/java/com/alibaba/excel/ExcelReader.java b/src/main/java/com/alibaba/excel/ExcelReader.java index 49fa8b6..e5dfe6f 100644 --- a/src/main/java/com/alibaba/excel/ExcelReader.java +++ b/src/main/java/com/alibaba/excel/ExcelReader.java @@ -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; diff --git a/src/main/java/com/alibaba/excel/parameter/AnalysisParam.java b/src/main/java/com/alibaba/excel/parameter/AnalysisParam.java deleted file mode 100644 index 5739f79..0000000 --- a/src/main/java/com/alibaba/excel/parameter/AnalysisParam.java +++ /dev/null @@ -1,59 +0,0 @@ -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; - } -} diff --git a/src/main/java/com/alibaba/excel/parameter/ExcelWriteParam.java b/src/main/java/com/alibaba/excel/parameter/ExcelWriteParam.java deleted file mode 100644 index ce42f9f..0000000 --- a/src/main/java/com/alibaba/excel/parameter/ExcelWriteParam.java +++ /dev/null @@ -1,46 +0,0 @@ -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; - } -} diff --git a/src/main/java/com/alibaba/excel/analysis/BaseSaxAnalyser.java b/src/main/java/com/alibaba/excel/read/BaseSaxAnalyser.java similarity index 88% rename from src/main/java/com/alibaba/excel/analysis/BaseSaxAnalyser.java rename to src/main/java/com/alibaba/excel/read/BaseSaxAnalyser.java index c8b09d2..e596543 100644 --- a/src/main/java/com/alibaba/excel/analysis/BaseSaxAnalyser.java +++ b/src/main/java/com/alibaba/excel/read/BaseSaxAnalyser.java @@ -1,14 +1,14 @@ -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; diff --git a/src/main/java/com/alibaba/excel/analysis/ExcelAnalyser.java b/src/main/java/com/alibaba/excel/read/ExcelAnalyser.java similarity index 92% rename from src/main/java/com/alibaba/excel/analysis/ExcelAnalyser.java rename to src/main/java/com/alibaba/excel/read/ExcelAnalyser.java index dad8730..0f7f17a 100644 --- a/src/main/java/com/alibaba/excel/analysis/ExcelAnalyser.java +++ b/src/main/java/com/alibaba/excel/read/ExcelAnalyser.java @@ -1,9 +1,9 @@ -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; diff --git a/src/main/java/com/alibaba/excel/analysis/ExcelAnalyserImpl.java b/src/main/java/com/alibaba/excel/read/ExcelAnalyserImpl.java similarity index 89% rename from src/main/java/com/alibaba/excel/analysis/ExcelAnalyserImpl.java rename to src/main/java/com/alibaba/excel/read/ExcelAnalyserImpl.java index 6c43678..9afed07 100644 --- a/src/main/java/com/alibaba/excel/analysis/ExcelAnalyserImpl.java +++ b/src/main/java/com/alibaba/excel/read/ExcelAnalyserImpl.java @@ -1,13 +1,13 @@ -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; /** diff --git a/src/main/java/com/alibaba/excel/analysis/SaxAnalyserV03.java b/src/main/java/com/alibaba/excel/read/SaxAnalyserV03.java similarity index 97% rename from src/main/java/com/alibaba/excel/analysis/SaxAnalyserV03.java rename to src/main/java/com/alibaba/excel/read/SaxAnalyserV03.java index a4336aa..bc86fe6 100644 --- a/src/main/java/com/alibaba/excel/analysis/SaxAnalyserV03.java +++ b/src/main/java/com/alibaba/excel/read/SaxAnalyserV03.java @@ -1,13 +1,12 @@ -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; diff --git a/src/main/java/com/alibaba/excel/analysis/SaxAnalyserV07.java b/src/main/java/com/alibaba/excel/read/SaxAnalyserV07.java similarity index 96% rename from src/main/java/com/alibaba/excel/analysis/SaxAnalyserV07.java rename to src/main/java/com/alibaba/excel/read/SaxAnalyserV07.java index b8a9b2d..5047f09 100644 --- a/src/main/java/com/alibaba/excel/analysis/SaxAnalyserV07.java +++ b/src/main/java/com/alibaba/excel/read/SaxAnalyserV07.java @@ -1,4 +1,4 @@ -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; diff --git a/src/main/java/com/alibaba/excel/context/AnalysisContext.java b/src/main/java/com/alibaba/excel/read/context/AnalysisContext.java similarity index 94% rename from src/main/java/com/alibaba/excel/context/AnalysisContext.java rename to src/main/java/com/alibaba/excel/read/context/AnalysisContext.java index f69e229..49b1bee 100644 --- a/src/main/java/com/alibaba/excel/context/AnalysisContext.java +++ b/src/main/java/com/alibaba/excel/read/context/AnalysisContext.java @@ -1,9 +1,9 @@ -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(); diff --git a/src/main/java/com/alibaba/excel/context/AnalysisContextImpl.java b/src/main/java/com/alibaba/excel/read/context/AnalysisContextImpl.java similarity index 95% rename from src/main/java/com/alibaba/excel/context/AnalysisContextImpl.java rename to src/main/java/com/alibaba/excel/read/context/AnalysisContextImpl.java index d4f8e6d..7da12e5 100644 --- a/src/main/java/com/alibaba/excel/context/AnalysisContextImpl.java +++ b/src/main/java/com/alibaba/excel/read/context/AnalysisContextImpl.java @@ -1,11 +1,11 @@ -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; diff --git a/src/main/java/com/alibaba/excel/event/AnalysisEventListener.java b/src/main/java/com/alibaba/excel/read/event/AnalysisEventListener.java similarity index 69% rename from src/main/java/com/alibaba/excel/event/AnalysisEventListener.java rename to src/main/java/com/alibaba/excel/read/event/AnalysisEventListener.java index 39c49e9..6cbfa64 100644 --- a/src/main/java/com/alibaba/excel/event/AnalysisEventListener.java +++ b/src/main/java/com/alibaba/excel/read/event/AnalysisEventListener.java @@ -1,6 +1,6 @@ -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 { /** - * 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 */ diff --git a/src/main/java/com/alibaba/excel/event/AnalysisEventRegisterCenter.java b/src/main/java/com/alibaba/excel/read/event/AnalysisEventRegisterCenter.java similarity index 92% rename from src/main/java/com/alibaba/excel/event/AnalysisEventRegisterCenter.java rename to src/main/java/com/alibaba/excel/read/event/AnalysisEventRegisterCenter.java index ae3a9ee..cfa10ae 100644 --- a/src/main/java/com/alibaba/excel/event/AnalysisEventRegisterCenter.java +++ b/src/main/java/com/alibaba/excel/read/event/AnalysisEventRegisterCenter.java @@ -1,4 +1,4 @@ -package com.alibaba.excel.event; +package com.alibaba.excel.read.event; /** diff --git a/src/main/java/com/alibaba/excel/event/OneRowAnalysisFinishEvent.java b/src/main/java/com/alibaba/excel/read/event/OneRowAnalysisFinishEvent.java similarity index 89% rename from src/main/java/com/alibaba/excel/event/OneRowAnalysisFinishEvent.java rename to src/main/java/com/alibaba/excel/read/event/OneRowAnalysisFinishEvent.java index 9ebdb5a..277472b 100644 --- a/src/main/java/com/alibaba/excel/event/OneRowAnalysisFinishEvent.java +++ b/src/main/java/com/alibaba/excel/read/event/OneRowAnalysisFinishEvent.java @@ -1,4 +1,4 @@ -package com.alibaba.excel.event; +package com.alibaba.excel.read.event; /** * @author jipengfei diff --git a/src/main/java/com/alibaba/excel/exception/ExcelAnalysisException.java b/src/main/java/com/alibaba/excel/read/exception/ExcelAnalysisException.java similarity index 91% rename from src/main/java/com/alibaba/excel/exception/ExcelAnalysisException.java rename to src/main/java/com/alibaba/excel/read/exception/ExcelAnalysisException.java index 63614b5..f5150eb 100644 --- a/src/main/java/com/alibaba/excel/exception/ExcelAnalysisException.java +++ b/src/main/java/com/alibaba/excel/read/exception/ExcelAnalysisException.java @@ -1,4 +1,4 @@ -package com.alibaba.excel.exception; +package com.alibaba.excel.read.exception; /** * Excel解析时候封装的异常 diff --git a/src/main/java/com/alibaba/excel/modelbuild/ModelBuildEventListener.java b/src/main/java/com/alibaba/excel/read/modelbuild/ModelBuildEventListener.java similarity index 90% rename from src/main/java/com/alibaba/excel/modelbuild/ModelBuildEventListener.java rename to src/main/java/com/alibaba/excel/read/modelbuild/ModelBuildEventListener.java index 607b8c5..c80d8b8 100644 --- a/src/main/java/com/alibaba/excel/modelbuild/ModelBuildEventListener.java +++ b/src/main/java/com/alibaba/excel/read/modelbuild/ModelBuildEventListener.java @@ -1,10 +1,10 @@ -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; diff --git a/src/main/java/com/alibaba/excel/analysis/v07/RowHandler.java b/src/main/java/com/alibaba/excel/read/v07/RowHandler.java similarity index 88% rename from src/main/java/com/alibaba/excel/analysis/v07/RowHandler.java rename to src/main/java/com/alibaba/excel/read/v07/RowHandler.java index e744b06..d068df2 100644 --- a/src/main/java/com/alibaba/excel/analysis/v07/RowHandler.java +++ b/src/main/java/com/alibaba/excel/read/v07/RowHandler.java @@ -1,13 +1,13 @@ -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 diff --git a/src/main/java/com/alibaba/excel/analysis/v07/XMLTempFile.java b/src/main/java/com/alibaba/excel/read/v07/XMLTempFile.java similarity index 97% rename from src/main/java/com/alibaba/excel/analysis/v07/XMLTempFile.java rename to src/main/java/com/alibaba/excel/read/v07/XMLTempFile.java index 6378e8a..2811225 100644 --- a/src/main/java/com/alibaba/excel/analysis/v07/XMLTempFile.java +++ b/src/main/java/com/alibaba/excel/read/v07/XMLTempFile.java @@ -1,4 +1,4 @@ -package com.alibaba.excel.analysis.v07; +package com.alibaba.excel.read.v07; import java.io.File; import java.security.SecureRandom; diff --git a/src/main/java/com/alibaba/excel/analysis/v07/XmlParserFactory.java b/src/main/java/com/alibaba/excel/read/v07/XmlParserFactory.java similarity index 95% rename from src/main/java/com/alibaba/excel/analysis/v07/XmlParserFactory.java rename to src/main/java/com/alibaba/excel/read/v07/XmlParserFactory.java index dba7f17..40b66a0 100644 --- a/src/main/java/com/alibaba/excel/analysis/v07/XmlParserFactory.java +++ b/src/main/java/com/alibaba/excel/read/v07/XmlParserFactory.java @@ -1,4 +1,4 @@ -package com.alibaba.excel.analysis.v07; +package com.alibaba.excel.read.v07; import java.io.IOException; import java.io.InputStream; diff --git a/src/main/java/com/alibaba/excel/constant/ExcelXmlConstants.java b/src/main/java/com/alibaba/excel/util/ExcelXmlConstants.java similarity index 92% rename from src/main/java/com/alibaba/excel/constant/ExcelXmlConstants.java rename to src/main/java/com/alibaba/excel/util/ExcelXmlConstants.java index 345ff01..b9c42af 100644 --- a/src/main/java/com/alibaba/excel/constant/ExcelXmlConstants.java +++ b/src/main/java/com/alibaba/excel/util/ExcelXmlConstants.java @@ -1,4 +1,4 @@ -package com.alibaba.excel.constant; +package com.alibaba.excel.util; /** * @author jipengfei diff --git a/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java b/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java index fd65690..55402ab 100644 --- a/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java +++ b/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java @@ -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; diff --git a/src/main/java/com/alibaba/excel/context/GenerateContext.java b/src/main/java/com/alibaba/excel/write/context/GenerateContext.java similarity index 94% rename from src/main/java/com/alibaba/excel/context/GenerateContext.java rename to src/main/java/com/alibaba/excel/write/context/GenerateContext.java index adcce3b..3ac0759 100644 --- a/src/main/java/com/alibaba/excel/context/GenerateContext.java +++ b/src/main/java/com/alibaba/excel/write/context/GenerateContext.java @@ -1,4 +1,4 @@ -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(); diff --git a/src/main/java/com/alibaba/excel/context/GenerateContextImpl.java b/src/main/java/com/alibaba/excel/write/context/GenerateContextImpl.java similarity index 99% rename from src/main/java/com/alibaba/excel/context/GenerateContextImpl.java rename to src/main/java/com/alibaba/excel/write/context/GenerateContextImpl.java index 8c05b48..9e0ab62 100644 --- a/src/main/java/com/alibaba/excel/context/GenerateContextImpl.java +++ b/src/main/java/com/alibaba/excel/write/context/GenerateContextImpl.java @@ -1,4 +1,4 @@ -package com.alibaba.excel.context; +package com.alibaba.excel.write.context; import java.io.OutputStream; import java.util.List; diff --git a/src/main/java/com/alibaba/excel/exception/ExcelGenerateException.java b/src/main/java/com/alibaba/excel/write/exception/ExcelGenerateException.java similarity index 90% rename from src/main/java/com/alibaba/excel/exception/ExcelGenerateException.java rename to src/main/java/com/alibaba/excel/write/exception/ExcelGenerateException.java index c31dd2b..69eea6b 100644 --- a/src/main/java/com/alibaba/excel/exception/ExcelGenerateException.java +++ b/src/main/java/com/alibaba/excel/write/exception/ExcelGenerateException.java @@ -1,4 +1,4 @@ -package com.alibaba.excel.exception; +package com.alibaba.excel.write.exception; /** * 生成Excel封装的异常 diff --git a/src/test/java/function/listener/ExcelListener.java b/src/test/java/function/listener/ExcelListener.java index dc59320..1194597 100644 --- a/src/test/java/function/listener/ExcelListener.java +++ b/src/test/java/function/listener/ExcelListener.java @@ -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; /** diff --git a/src/test/java/function/read/ExelAllDataTypeTest.java b/src/test/java/function/read/ExelAllDataTypeTest.java index 64d2089..e8b925b 100644 --- a/src/test/java/function/read/ExelAllDataTypeTest.java +++ b/src/test/java/function/read/ExelAllDataTypeTest.java @@ -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; diff --git a/src/test/java/function/read/NumTest3.java b/src/test/java/function/read/NumTest3.java index 3871002..1b96d2a 100644 --- a/src/test/java/function/read/NumTest3.java +++ b/src/test/java/function/read/NumTest3.java @@ -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; diff --git a/src/test/java/function/read/ReadSheets.java b/src/test/java/function/read/ReadSheets.java index 2b2dd13..61b081b 100644 --- a/src/test/java/function/read/ReadSheets.java +++ b/src/test/java/function/read/ReadSheets.java @@ -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; diff --git a/src/test/java/function/read/XLSX2007FunctionTest.java b/src/test/java/function/read/XLSX2007FunctionTest.java index bf75a39..0ef5e0a 100644 --- a/src/test/java/function/read/XLSX2007FunctionTest.java +++ b/src/test/java/function/read/XLSX2007FunctionTest.java @@ -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; diff --git a/src/test/java/function/write/ExcelWriteTest1.java b/src/test/java/function/write/ExcelWriteTest1.java index 3bc5d65..fc2ab92 100644 --- a/src/test/java/function/write/ExcelWriteTest1.java +++ b/src/test/java/function/write/ExcelWriteTest1.java @@ -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; diff --git a/src/test/java/read/v03/XLS2003FunctionTest.java b/src/test/java/read/v03/XLS2003FunctionTest.java index ab10f7d..805c8d9 100644 --- a/src/test/java/read/v03/XLS2003FunctionTest.java +++ b/src/test/java/read/v03/XLS2003FunctionTest.java @@ -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; diff --git a/src/test/java/read/v07/Read2007Xlsx.java b/src/test/java/read/v07/Read2007Xlsx.java index b30baee..4fe0156 100644 --- a/src/test/java/read/v07/Read2007Xlsx.java +++ b/src/test/java/read/v07/Read2007Xlsx.java @@ -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; diff --git a/src/test/java/read/v07/listener/Excel2007NoJavaModelAnalysisListener.java b/src/test/java/read/v07/listener/Excel2007NoJavaModelAnalysisListener.java index a0663c7..c1334d8 100644 --- a/src/test/java/read/v07/listener/Excel2007NoJavaModelAnalysisListener.java +++ b/src/test/java/read/v07/listener/Excel2007NoJavaModelAnalysisListener.java @@ -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 diff --git a/src/test/java/read/v07/listener/Excel2007WithJavaModelAnalysisListener.java b/src/test/java/read/v07/listener/Excel2007WithJavaModelAnalysisListener.java index 1343b4a..eb4fd52 100644 --- a/src/test/java/read/v07/listener/Excel2007WithJavaModelAnalysisListener.java +++ b/src/test/java/read/v07/listener/Excel2007WithJavaModelAnalysisListener.java @@ -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;