Browse Source

修改测试案例

pull/2159/head
Jiaju Zhuang 3 years ago
parent
commit
7bd8caa559
  1. 18
      src/main/java/com/alibaba/excel/converters/ConverterKeyBuild.java
  2. 8
      src/main/java/com/alibaba/excel/converters/ReadConverterContext.java
  3. 8
      src/main/java/com/alibaba/excel/converters/WriteConverterContext.java
  4. 8
      src/main/java/com/alibaba/excel/exception/ExcelDataConvertException.java
  5. 8
      src/main/java/com/alibaba/excel/exception/ExcelWriteDataConvertException.java
  6. 8
      src/main/java/com/alibaba/excel/metadata/AbstractCell.java
  7. 8
      src/main/java/com/alibaba/excel/metadata/AbstractHolder.java
  8. 8
      src/main/java/com/alibaba/excel/metadata/BasicParameter.java
  9. 8
      src/main/java/com/alibaba/excel/metadata/CellRange.java
  10. 8
      src/main/java/com/alibaba/excel/metadata/GlobalConfiguration.java
  11. 8
      src/main/java/com/alibaba/excel/metadata/Head.java
  12. 6
      src/main/java/com/alibaba/excel/metadata/csv/CsvCell.java
  13. 8
      src/main/java/com/alibaba/excel/metadata/csv/CsvCellStyle.java
  14. 8
      src/main/java/com/alibaba/excel/metadata/csv/CsvRow.java
  15. 8
      src/main/java/com/alibaba/excel/metadata/csv/CsvSheet.java
  16. 8
      src/main/java/com/alibaba/excel/metadata/csv/CsvWorkbook.java
  17. 8
      src/main/java/com/alibaba/excel/metadata/data/CellData.java
  18. 7
      src/main/java/com/alibaba/excel/metadata/data/ClientAnchorData.java
  19. 8
      src/main/java/com/alibaba/excel/metadata/data/CommentData.java
  20. 8
      src/main/java/com/alibaba/excel/metadata/data/CoordinateData.java
  21. 8
      src/main/java/com/alibaba/excel/metadata/data/DataFormatData.java
  22. 8
      src/main/java/com/alibaba/excel/metadata/data/FormulaData.java
  23. 7
      src/main/java/com/alibaba/excel/metadata/data/HyperlinkData.java
  24. 7
      src/main/java/com/alibaba/excel/metadata/data/ImageData.java
  25. 8
      src/main/java/com/alibaba/excel/metadata/data/ReadCellData.java
  26. 12
      src/main/java/com/alibaba/excel/metadata/data/RichTextStringData.java
  27. 8
      src/main/java/com/alibaba/excel/metadata/data/WriteCellData.java
  28. 8
      src/main/java/com/alibaba/excel/metadata/property/DateTimeFormatProperty.java
  29. 8
      src/main/java/com/alibaba/excel/metadata/property/ExcelContentProperty.java
  30. 8
      src/main/java/com/alibaba/excel/metadata/property/ExcelHeadProperty.java
  31. 8
      src/main/java/com/alibaba/excel/metadata/property/FontProperty.java
  32. 8
      src/main/java/com/alibaba/excel/metadata/property/StyleProperty.java
  33. 8
      src/main/java/com/alibaba/excel/read/metadata/ReadBasicParameter.java
  34. 8
      src/main/java/com/alibaba/excel/read/metadata/ReadWorkbook.java
  35. 8
      src/main/java/com/alibaba/excel/read/metadata/holder/AbstractReadHolder.java
  36. 8
      src/main/java/com/alibaba/excel/read/metadata/holder/ReadSheetHolder.java
  37. 8
      src/main/java/com/alibaba/excel/read/metadata/holder/ReadWorkbookHolder.java
  38. 8
      src/main/java/com/alibaba/excel/read/metadata/holder/csv/CsvReadSheetHolder.java
  39. 8
      src/main/java/com/alibaba/excel/read/metadata/holder/csv/CsvReadWorkbookHolder.java
  40. 8
      src/main/java/com/alibaba/excel/read/metadata/holder/xlsx/XlsxReadSheetHolder.java
  41. 8
      src/main/java/com/alibaba/excel/read/metadata/holder/xlsx/XlsxReadWorkbookHolder.java
  42. 8
      src/main/java/com/alibaba/excel/util/ClassUtils.java
  43. 9
      src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java
  44. 8
      src/main/java/com/alibaba/excel/write/handler/chain/CellHandlerExecutionChain.java
  45. 8
      src/main/java/com/alibaba/excel/write/handler/chain/RowHandlerExecutionChain.java
  46. 8
      src/main/java/com/alibaba/excel/write/handler/chain/SheetHandlerExecutionChain.java
  47. 8
      src/main/java/com/alibaba/excel/write/handler/chain/WorkbookHandlerExecutionChain.java
  48. 8
      src/main/java/com/alibaba/excel/write/handler/context/CellWriteHandlerContext.java
  49. 8
      src/main/java/com/alibaba/excel/write/handler/context/RowWriteHandlerContext.java
  50. 8
      src/main/java/com/alibaba/excel/write/handler/context/SheetWriteHandlerContext.java
  51. 8
      src/main/java/com/alibaba/excel/write/handler/context/WorkbookWriteHandlerContext.java
  52. 8
      src/main/java/com/alibaba/excel/write/metadata/WriteBasicParameter.java
  53. 8
      src/main/java/com/alibaba/excel/write/metadata/WriteSheet.java
  54. 8
      src/main/java/com/alibaba/excel/write/metadata/WriteTable.java
  55. 8
      src/main/java/com/alibaba/excel/write/metadata/WriteWorkbook.java
  56. 8
      src/main/java/com/alibaba/excel/write/metadata/fill/AnalysisCell.java
  57. 8
      src/main/java/com/alibaba/excel/write/metadata/fill/FillConfig.java
  58. 18
      src/main/java/com/alibaba/excel/write/metadata/holder/AbstractWriteHolder.java
  59. 8
      src/main/java/com/alibaba/excel/write/metadata/holder/WriteSheetHolder.java
  60. 8
      src/main/java/com/alibaba/excel/write/metadata/holder/WriteTableHolder.java
  61. 10
      src/main/java/com/alibaba/excel/write/metadata/holder/WriteWorkbookHolder.java
  62. 8
      src/main/java/com/alibaba/excel/write/metadata/style/WriteCellStyle.java
  63. 8
      src/main/java/com/alibaba/excel/write/metadata/style/WriteFont.java
  64. 8
      src/main/java/com/alibaba/excel/write/property/ExcelWriteHeadProperty.java
  65. 8
      src/main/java/com/alibaba/excel/write/style/HorizontalCellStyleStrategy.java
  66. 8
      src/test/java/com/alibaba/easyexcel/test/core/annotation/AnnotationData.java
  67. 8
      src/test/java/com/alibaba/easyexcel/test/core/annotation/AnnotationIndexAndNameData.java
  68. 8
      src/test/java/com/alibaba/easyexcel/test/core/celldata/CellDataReadData.java
  69. 8
      src/test/java/com/alibaba/easyexcel/test/core/celldata/CellDataWriteData.java
  70. 8
      src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterReadData.java
  71. 8
      src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterWriteData.java
  72. 8
      src/test/java/com/alibaba/easyexcel/test/core/converter/ImageData.java
  73. 8
      src/test/java/com/alibaba/easyexcel/test/core/converter/ReadAllConverterData.java
  74. 8
      src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatData.java
  75. 8
      src/test/java/com/alibaba/easyexcel/test/core/encrypt/EncryptData.java
  76. 8
      src/test/java/com/alibaba/easyexcel/test/core/exception/ExceptionData.java
  77. 8
      src/test/java/com/alibaba/easyexcel/test/core/excludeorinclude/ExcludeOrIncludeData.java
  78. 8
      src/test/java/com/alibaba/easyexcel/test/core/extra/ExtraData.java
  79. 8
      src/test/java/com/alibaba/easyexcel/test/core/fill/FillData.java
  80. 8
      src/test/java/com/alibaba/easyexcel/test/core/fill/style/FillStyleAnnotatedData.java
  81. 8
      src/test/java/com/alibaba/easyexcel/test/core/fill/style/FillStyleData.java
  82. 8
      src/test/java/com/alibaba/easyexcel/test/core/handler/WriteHandlerData.java
  83. 8
      src/test/java/com/alibaba/easyexcel/test/core/head/ComplexHeadData.java
  84. 8
      src/test/java/com/alibaba/easyexcel/test/core/head/NoHeadData.java
  85. 8
      src/test/java/com/alibaba/easyexcel/test/core/large/LargeData.java
  86. 8
      src/test/java/com/alibaba/easyexcel/test/core/multiplesheets/MultipleSheetsData.java
  87. 8
      src/test/java/com/alibaba/easyexcel/test/core/noncamel/UnCamelData.java
  88. 8
      src/test/java/com/alibaba/easyexcel/test/core/parameter/ParameterData.java
  89. 8
      src/test/java/com/alibaba/easyexcel/test/core/repetition/RepetitionData.java
  90. 8
      src/test/java/com/alibaba/easyexcel/test/core/simple/SimpleData.java
  91. 8
      src/test/java/com/alibaba/easyexcel/test/core/skip/SkipData.java
  92. 8
      src/test/java/com/alibaba/easyexcel/test/core/sort/SortData.java
  93. 8
      src/test/java/com/alibaba/easyexcel/test/core/style/StyleData.java
  94. 8
      src/test/java/com/alibaba/easyexcel/test/core/template/TemplateData.java
  95. 8
      src/test/java/com/alibaba/easyexcel/test/demo/fill/FillData.java
  96. 8
      src/test/java/com/alibaba/easyexcel/test/demo/read/CellDataReadDemoData.java
  97. 8
      src/test/java/com/alibaba/easyexcel/test/demo/read/ConverterData.java
  98. 8
      src/test/java/com/alibaba/easyexcel/test/demo/read/DemoData.java
  99. 8
      src/test/java/com/alibaba/easyexcel/test/demo/read/DemoExtraData.java
  100. 8
      src/test/java/com/alibaba/easyexcel/test/demo/read/ExceptionDemoData.java
  101. Some files were not shown because too many files have changed in this diff Show More

18
src/main/java/com/alibaba/excel/converters/ConverterKeyBuild.java

@ -6,7 +6,9 @@ import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.util.MapUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Converter unique key.Consider that you can just use class as the key.
@ -29,18 +31,20 @@ public class ConverterKeyBuild {
}
public static ConverterKey buildKey(Class<?> clazz) {
Class<?> boxingClass = BOXING_MAP.get(clazz);
if (boxingClass != null) {
return new ConverterKey(boxingClass, null);
}
return new ConverterKey(clazz, null);
return buildKey(clazz, null);
}
public static ConverterKey buildKey(Class<?> clazz, CellDataTypeEnum cellDataTypeEnum) {
Class<?> boxingClass = BOXING_MAP.get(clazz);
if (boxingClass != null) {
return new ConverterKey(boxingClass, cellDataTypeEnum);
}
return new ConverterKey(clazz, cellDataTypeEnum);
}
@Data
@Getter
@Setter
@EqualsAndHashCode
@AllArgsConstructor
public static class ConverterKey {
private Class<?> clazz;

8
src/main/java/com/alibaba/excel/converters/ReadConverterContext.java

@ -5,14 +5,18 @@ import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* read converter context
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@AllArgsConstructor
public class ReadConverterContext<T> {
/**

8
src/main/java/com/alibaba/excel/converters/WriteConverterContext.java

@ -4,15 +4,19 @@ import com.alibaba.excel.context.WriteContext;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* write converter context
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
public class WriteConverterContext<T> {

8
src/main/java/com/alibaba/excel/exception/ExcelDataConvertException.java

@ -4,14 +4,18 @@ import com.alibaba.excel.metadata.data.CellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.alibaba.excel.write.builder.ExcelWriterBuilder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Data convert exception
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ExcelDataConvertException extends RuntimeException {
/**
* NotNull.

8
src/main/java/com/alibaba/excel/exception/ExcelWriteDataConvertException.java

@ -2,14 +2,18 @@ package com.alibaba.excel.exception;
import com.alibaba.excel.write.handler.context.CellWriteHandlerContext;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Data convert exception
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ExcelWriteDataConvertException extends ExcelDataConvertException {
/**
* handler.

8
src/main/java/com/alibaba/excel/metadata/AbstractCell.java

@ -1,13 +1,17 @@
package com.alibaba.excel.metadata;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* cell
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class AbstractCell implements Cell {
/**
* Row index

8
src/main/java/com/alibaba/excel/metadata/AbstractHolder.java

@ -6,15 +6,19 @@ import java.util.Map;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.converters.ConverterKeyBuild.ConverterKey;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* Write/read holder
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@NoArgsConstructor
public abstract class AbstractHolder implements ConfigurationHolder {
/**

8
src/main/java/com/alibaba/excel/metadata/BasicParameter.java

@ -5,14 +5,18 @@ import java.util.Locale;
import com.alibaba.excel.converters.Converter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Basic parameter
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class BasicParameter {
/**
* You can only choose one of the {@link BasicParameter#head} and {@link BasicParameter#clazz}

8
src/main/java/com/alibaba/excel/metadata/CellRange.java

@ -1,11 +1,15 @@
package com.alibaba.excel.metadata;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author jipengfei
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CellRange {
private int firstRow;

8
src/main/java/com/alibaba/excel/metadata/GlobalConfiguration.java

@ -2,14 +2,18 @@ package com.alibaba.excel.metadata;
import java.util.Locale;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Global configuration
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class GlobalConfiguration {
/**
* Automatic trim includes sheet name and content

8
src/main/java/com/alibaba/excel/metadata/Head.java

@ -10,14 +10,18 @@ import com.alibaba.excel.metadata.property.FontProperty;
import com.alibaba.excel.metadata.property.LoopMergeProperty;
import com.alibaba.excel.metadata.property.StyleProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* excel head
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class Head {
/**
* Column index of head

6
src/main/java/com/alibaba/excel/metadata/csv/CsvCell.java

@ -10,7 +10,7 @@ import com.alibaba.excel.enums.NumericCellTypeEnum;
import com.alibaba.excel.metadata.data.FormulaData;
import lombok.AccessLevel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.ss.SpreadsheetVersion;
@ -29,7 +29,9 @@ import org.apache.poi.ss.util.CellRangeAddress;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CsvCell extends CellBase {
/**

8
src/main/java/com/alibaba/excel/metadata/csv/CsvCellStyle.java

@ -2,7 +2,9 @@ package com.alibaba.excel.metadata.csv;
import com.alibaba.excel.metadata.data.DataFormatData;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Color;
@ -16,7 +18,9 @@ import org.apache.poi.ss.usermodel.VerticalAlignment;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CsvCellStyle implements CellStyle {
/**

8
src/main/java/com/alibaba/excel/metadata/csv/CsvRow.java

@ -3,7 +3,9 @@ package com.alibaba.excel.metadata.csv;
import java.util.Iterator;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.compress.utils.Lists;
import org.apache.poi.ss.usermodel.Cell;
@ -17,7 +19,9 @@ import org.apache.poi.ss.usermodel.Sheet;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CsvRow implements Row {
/**

8
src/main/java/com/alibaba/excel/metadata/csv/CsvSheet.java

@ -16,7 +16,9 @@ import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.util.NumberDataFormatterUtils;
import com.alibaba.excel.util.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVPrinter;
import org.apache.poi.ss.usermodel.AutoFilter;
@ -45,7 +47,9 @@ import org.apache.poi.ss.util.PaneInformation;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CsvSheet implements Sheet, Closeable {
/**
* workbook

8
src/main/java/com/alibaba/excel/metadata/csv/CsvWorkbook.java

@ -6,7 +6,9 @@ import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.compress.utils.Lists;
import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.ss.formula.udf.UDFFinder;
@ -26,7 +28,9 @@ import org.apache.poi.ss.usermodel.Workbook;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CsvWorkbook implements Workbook {
/**
* output

8
src/main/java/com/alibaba/excel/metadata/data/CellData.java

@ -6,7 +6,9 @@ import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.AbstractCell;
import com.alibaba.excel.util.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Excel internal cell data.
@ -15,7 +17,9 @@ import lombok.Data;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CellData<T> extends AbstractCell {
/**
* cell type

7
src/main/java/com/alibaba/excel/metadata/data/ClientAnchorData.java

@ -1,7 +1,8 @@
package com.alibaba.excel.metadata.data;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.ss.usermodel.ClientAnchor;
import org.apache.poi.util.Internal;
@ -21,7 +22,9 @@ import org.apache.poi.util.Internal;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ClientAnchorData extends CoordinateData {
/**
* top

8
src/main/java/com/alibaba/excel/metadata/data/CommentData.java

@ -1,13 +1,17 @@
package com.alibaba.excel.metadata.data;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* comment
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CommentData extends ClientAnchorData {
/**
* Name of the original comment author

8
src/main/java/com/alibaba/excel/metadata/data/CoordinateData.java

@ -1,13 +1,17 @@
package com.alibaba.excel.metadata.data;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* coordinate.
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CoordinateData {
/**
* first row index.Priority is higher than {@link #relativeFirstRowIndex}.

8
src/main/java/com/alibaba/excel/metadata/data/DataFormatData.java

@ -2,14 +2,18 @@ package com.alibaba.excel.metadata.data;
import com.alibaba.excel.util.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* data format
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class DataFormatData {
/**
* index

8
src/main/java/com/alibaba/excel/metadata/data/FormulaData.java

@ -1,13 +1,17 @@
package com.alibaba.excel.metadata.data;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* formula
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class FormulaData {
/**
* formula

7
src/main/java/com/alibaba/excel/metadata/data/HyperlinkData.java

@ -1,14 +1,17 @@
package com.alibaba.excel.metadata.data;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* hyperlink
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class HyperlinkData extends CoordinateData {
/**
* Depending on the hyperlink type it can be URL, e-mail, path to a file, etc

7
src/main/java/com/alibaba/excel/metadata/data/ImageData.java

@ -1,14 +1,17 @@
package com.alibaba.excel.metadata.data;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* image
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ImageData extends ClientAnchorData {
/**

8
src/main/java/com/alibaba/excel/metadata/data/ReadCellData.java

@ -4,15 +4,19 @@ import java.math.BigDecimal;
import com.alibaba.excel.enums.CellDataTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* read cell data
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@NoArgsConstructor
public class ReadCellData<T> extends CellData<T> {
/**

12
src/main/java/com/alibaba/excel/metadata/data/RichTextStringData.java

@ -6,15 +6,19 @@ import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.style.WriteFont;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* rich text string
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@NoArgsConstructor
public class RichTextStringData {
private String textString;
@ -25,7 +29,9 @@ public class RichTextStringData {
this.textString = textString;
}
@Data
@Getter
@Setter
@EqualsAndHashCode
@AllArgsConstructor
public static class IntervalFont {
private Integer startIndex;

8
src/main/java/com/alibaba/excel/metadata/data/WriteCellData.java

@ -10,8 +10,10 @@ import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.poi.ss.usermodel.CellStyle;
/**
@ -19,7 +21,9 @@ import org.apache.poi.ss.usermodel.CellStyle;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@NoArgsConstructor
public class WriteCellData<T> extends CellData<T> {
/**

8
src/main/java/com/alibaba/excel/metadata/property/DateTimeFormatProperty.java

@ -3,14 +3,18 @@ package com.alibaba.excel.metadata.property;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.util.BooleanUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Configuration from annotations
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class DateTimeFormatProperty {
private String format;
private Boolean use1904windowing;

8
src/main/java/com/alibaba/excel/metadata/property/ExcelContentProperty.java

@ -4,12 +4,16 @@ import java.lang.reflect.Field;
import com.alibaba.excel.converters.Converter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author jipengfei
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ExcelContentProperty {
public static final ExcelContentProperty EMPTY = new ExcelContentProperty();

8
src/main/java/com/alibaba/excel/metadata/property/ExcelHeadProperty.java

@ -17,7 +17,9 @@ import com.alibaba.excel.util.MapUtils;
import com.alibaba.excel.util.StringUtils;
import com.alibaba.excel.write.metadata.holder.AbstractWriteHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -27,7 +29,9 @@ import org.slf4j.LoggerFactory;
*
* @author jipengfei
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ExcelHeadProperty {
private static final Logger LOGGER = LoggerFactory.getLogger(ExcelHeadProperty.class);

8
src/main/java/com/alibaba/excel/metadata/property/FontProperty.java

@ -4,7 +4,9 @@ import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.util.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.common.usermodel.fonts.FontCharset;
import org.apache.poi.hssf.usermodel.HSSFPalette;
import org.apache.poi.ss.usermodel.Font;
@ -15,7 +17,9 @@ import org.apache.poi.ss.usermodel.IndexedColors;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class FontProperty {
/**
* The name for the font (i.e. Arial)

8
src/main/java/com/alibaba/excel/metadata/property/StyleProperty.java

@ -5,7 +5,9 @@ import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.metadata.data.DataFormatData;
import com.alibaba.excel.write.metadata.style.WriteFont;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.BuiltinFormats;
import org.apache.poi.ss.usermodel.FillPatternType;
@ -19,7 +21,9 @@ import org.apache.poi.ss.usermodel.VerticalAlignment;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class StyleProperty {
/**
* Set the data format (must be a valid format). Built in formats are defined at {@link BuiltinFormats}.

8
src/main/java/com/alibaba/excel/read/metadata/ReadBasicParameter.java

@ -6,14 +6,18 @@ import java.util.List;
import com.alibaba.excel.metadata.BasicParameter;
import com.alibaba.excel.read.listener.ReadListener;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Read basic parameter
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ReadBasicParameter extends BasicParameter {
/**
* Count the number of added heads when read sheet.

8
src/main/java/com/alibaba/excel/read/metadata/ReadWorkbook.java

@ -14,14 +14,18 @@ import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.read.listener.ModelBuildEventListener;
import com.alibaba.excel.support.ExcelTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Workbook
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ReadWorkbook extends ReadBasicParameter {
/**
* Excel type

8
src/main/java/com/alibaba/excel/read/metadata/holder/AbstractReadHolder.java

@ -15,15 +15,19 @@ import com.alibaba.excel.read.metadata.ReadWorkbook;
import com.alibaba.excel.read.metadata.property.ExcelReadHeadProperty;
import com.alibaba.excel.util.ListUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* Read Holder
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@NoArgsConstructor
public abstract class AbstractReadHolder extends AbstractHolder implements ReadHolder {
/**

8
src/main/java/com/alibaba/excel/read/metadata/holder/ReadSheetHolder.java

@ -9,15 +9,19 @@ import com.alibaba.excel.metadata.CellExtra;
import com.alibaba.excel.metadata.data.ReadCellData;
import com.alibaba.excel.read.metadata.ReadSheet;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* sheet holder
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@NoArgsConstructor
public class ReadSheetHolder extends AbstractReadHolder {

8
src/main/java/com/alibaba/excel/read/metadata/holder/ReadWorkbookHolder.java

@ -19,15 +19,19 @@ import com.alibaba.excel.read.metadata.ReadSheet;
import com.alibaba.excel.read.metadata.ReadWorkbook;
import com.alibaba.excel.support.ExcelTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* Workbook holder
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@NoArgsConstructor
public class ReadWorkbookHolder extends AbstractReadHolder {

8
src/main/java/com/alibaba/excel/read/metadata/holder/csv/CsvReadSheetHolder.java

@ -4,14 +4,18 @@ import com.alibaba.excel.read.metadata.ReadSheet;
import com.alibaba.excel.read.metadata.holder.ReadSheetHolder;
import com.alibaba.excel.read.metadata.holder.ReadWorkbookHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* sheet holder
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CsvReadSheetHolder extends ReadSheetHolder {
public CsvReadSheetHolder(ReadSheet readSheet, ReadWorkbookHolder readWorkbookHolder) {

8
src/main/java/com/alibaba/excel/read/metadata/holder/csv/CsvReadWorkbookHolder.java

@ -4,7 +4,9 @@ import com.alibaba.excel.read.metadata.ReadWorkbook;
import com.alibaba.excel.read.metadata.holder.ReadWorkbookHolder;
import com.alibaba.excel.support.ExcelTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.csv.CSVFormat;
/**
@ -12,7 +14,9 @@ import org.apache.commons.csv.CSVFormat;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CsvReadWorkbookHolder extends ReadWorkbookHolder {
private CSVFormat csvFormat;

8
src/main/java/com/alibaba/excel/read/metadata/holder/xlsx/XlsxReadSheetHolder.java

@ -7,14 +7,18 @@ import com.alibaba.excel.read.metadata.ReadSheet;
import com.alibaba.excel.read.metadata.holder.ReadSheetHolder;
import com.alibaba.excel.read.metadata.holder.ReadWorkbookHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* sheet holder
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class XlsxReadSheetHolder extends ReadSheetHolder {
/**
* Record the label of the current operation to prevent NPE.

8
src/main/java/com/alibaba/excel/read/metadata/holder/xlsx/XlsxReadWorkbookHolder.java

@ -11,7 +11,9 @@ import com.alibaba.excel.read.metadata.holder.ReadWorkbookHolder;
import com.alibaba.excel.support.ExcelTypeEnum;
import com.alibaba.excel.util.MapUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.xssf.model.StylesTable;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
@ -21,7 +23,9 @@ import org.apache.poi.xssf.usermodel.XSSFCellStyle;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class XlsxReadWorkbookHolder extends ReadWorkbookHolder {
/**
* Package

8
src/main/java/com/alibaba/excel/util/ClassUtils.java

@ -32,7 +32,9 @@ import com.alibaba.excel.metadata.property.StyleProperty;
import com.alibaba.excel.write.metadata.holder.WriteHolder;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import net.sf.cglib.beans.BeanMap;
/**
@ -403,7 +405,9 @@ public class ClassUtils {
}
}
@Data
@Getter
@Setter
@EqualsAndHashCode
@AllArgsConstructor
public static class ContentPropertyKey {
private Class<?> clazz;

9
src/main/java/com/alibaba/excel/write/executor/ExcelWriteFillExecutor.java

@ -33,7 +33,9 @@ import com.alibaba.excel.write.metadata.fill.FillWrapper;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.poi.hssf.usermodel.PoiUtils;
import org.apache.poi.ss.usermodel.Cell;
@ -232,6 +234,7 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor {
List<WriteCellData<?>> cellDataList = new ArrayList<>();
cellWriteHandlerContext.setExcelContentProperty(ExcelContentProperty.EMPTY);
cellWriteHandlerContext.setIgnoreFillStyle(Boolean.TRUE);
createCell(analysisCell, fillConfig, cellWriteHandlerContext);
Cell cell = cellWriteHandlerContext.getCell();
@ -600,7 +603,9 @@ public class ExcelWriteFillExecutor extends AbstractExcelWriteExecutor {
return new UniqueDataFlagKey(writeSheetHolder.getSheetNo(), writeSheetHolder.getSheetName(), wrapperName);
}
@Data
@Getter
@Setter
@EqualsAndHashCode
@AllArgsConstructor
public static class UniqueDataFlagKey {
private Integer sheetNo;

8
src/main/java/com/alibaba/excel/write/handler/chain/CellHandlerExecutionChain.java

@ -3,14 +3,18 @@ package com.alibaba.excel.write.handler.chain;
import com.alibaba.excel.write.handler.CellWriteHandler;
import com.alibaba.excel.write.handler.context.CellWriteHandlerContext;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Execute the cell handler chain
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CellHandlerExecutionChain {
/**
* next chain

8
src/main/java/com/alibaba/excel/write/handler/chain/RowHandlerExecutionChain.java

@ -3,14 +3,18 @@ package com.alibaba.excel.write.handler.chain;
import com.alibaba.excel.write.handler.RowWriteHandler;
import com.alibaba.excel.write.handler.context.RowWriteHandlerContext;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Execute the row handler chain
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class RowHandlerExecutionChain {
/**
* next chain

8
src/main/java/com/alibaba/excel/write/handler/chain/SheetHandlerExecutionChain.java

@ -3,14 +3,18 @@ package com.alibaba.excel.write.handler.chain;
import com.alibaba.excel.write.handler.SheetWriteHandler;
import com.alibaba.excel.write.handler.context.SheetWriteHandlerContext;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Execute the sheet handler chain
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class SheetHandlerExecutionChain {
/**
* next chain

8
src/main/java/com/alibaba/excel/write/handler/chain/WorkbookHandlerExecutionChain.java

@ -3,14 +3,18 @@ package com.alibaba.excel.write.handler.chain;
import com.alibaba.excel.write.handler.WorkbookWriteHandler;
import com.alibaba.excel.write.handler.context.WorkbookWriteHandlerContext;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Execute the workbook handler chain
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class WorkbookHandlerExecutionChain {
/**
* next chain

8
src/main/java/com/alibaba/excel/write/handler/context/CellWriteHandlerContext.java

@ -12,7 +12,9 @@ import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.metadata.holder.WriteTableHolder;
import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
@ -21,7 +23,9 @@ import org.apache.poi.ss.usermodel.Row;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CellWriteHandlerContext {
/**
* write context

8
src/main/java/com/alibaba/excel/write/handler/context/RowWriteHandlerContext.java

@ -6,7 +6,9 @@ import com.alibaba.excel.write.metadata.holder.WriteTableHolder;
import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.ss.usermodel.Row;
/**
@ -14,7 +16,9 @@ import org.apache.poi.ss.usermodel.Row;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@AllArgsConstructor
public class RowWriteHandlerContext {
/**

8
src/main/java/com/alibaba/excel/write/handler/context/SheetWriteHandlerContext.java

@ -5,14 +5,18 @@ import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* sheet context
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@AllArgsConstructor
public class SheetWriteHandlerContext {
/**

8
src/main/java/com/alibaba/excel/write/handler/context/WorkbookWriteHandlerContext.java

@ -4,14 +4,18 @@ import com.alibaba.excel.context.WriteContext;
import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* workbook context
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@AllArgsConstructor
public class WorkbookWriteHandlerContext {
/**

8
src/main/java/com/alibaba/excel/write/metadata/WriteBasicParameter.java

@ -7,14 +7,18 @@ import java.util.List;
import com.alibaba.excel.metadata.BasicParameter;
import com.alibaba.excel.write.handler.WriteHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Write basic parameter
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class WriteBasicParameter extends BasicParameter {
/**
* Writes the head relative to the existing contents of the sheet. Indexes are zero-based.

8
src/main/java/com/alibaba/excel/write/metadata/WriteSheet.java

@ -1,13 +1,17 @@
package com.alibaba.excel.write.metadata;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Write sheet
*
* @author jipengfei
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class WriteSheet extends WriteBasicParameter {
/**
* Starting from 0

8
src/main/java/com/alibaba/excel/write/metadata/WriteTable.java

@ -1,13 +1,17 @@
package com.alibaba.excel.write.metadata;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* table
*
* @author jipengfei
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class WriteTable extends WriteBasicParameter {
/**
* Starting from 0

8
src/main/java/com/alibaba/excel/write/metadata/WriteWorkbook.java

@ -7,14 +7,18 @@ import java.nio.charset.Charset;
import com.alibaba.excel.support.ExcelTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Workbook
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class WriteWorkbook extends WriteBasicParameter {
/**
* Excel type.The default is xlsx

8
src/main/java/com/alibaba/excel/write/metadata/fill/AnalysisCell.java

@ -4,14 +4,18 @@ import java.util.List;
import com.alibaba.excel.enums.WriteTemplateAnalysisCellTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Read the cells of the template while populating the data.
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class AnalysisCell {
private int columnIndex;
private int rowIndex;

8
src/main/java/com/alibaba/excel/write/metadata/fill/FillConfig.java

@ -4,15 +4,19 @@ import com.alibaba.excel.enums.WriteDirectionEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* Fill config
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
@Builder
@NoArgsConstructor
@AllArgsConstructor

18
src/main/java/com/alibaba/excel/write/metadata/holder/AbstractWriteHolder.java

@ -41,8 +41,10 @@ import com.alibaba.excel.write.style.AbstractVerticalCellStyleStrategy;
import com.alibaba.excel.write.style.column.AbstractHeadColumnWidthStyleStrategy;
import com.alibaba.excel.write.style.row.SimpleRowHeightStyleStrategy;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.commons.collections4.CollectionUtils;
/**
@ -50,7 +52,9 @@ import org.apache.commons.collections4.CollectionUtils;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@NoArgsConstructor
public abstract class AbstractWriteHolder extends AbstractHolder implements WriteHolder {
/**
@ -380,9 +384,7 @@ public abstract class AbstractWriteHolder extends AbstractHolder implements Writ
} else {
cellHandlerExecutionChain.addLast((CellWriteHandler)writeHandler);
}
this.writeHandlerList.add(writeHandler);
}
return;
}
if (writeHandler instanceof RowWriteHandler) {
if (!runOwn) {
@ -391,9 +393,7 @@ public abstract class AbstractWriteHolder extends AbstractHolder implements Writ
} else {
rowHandlerExecutionChain.addLast((RowWriteHandler)writeHandler);
}
this.writeHandlerList.add(writeHandler);
}
return;
}
if (writeHandler instanceof SheetWriteHandler) {
if (!runOwn) {
@ -402,7 +402,6 @@ public abstract class AbstractWriteHolder extends AbstractHolder implements Writ
} else {
sheetHandlerExecutionChain.addLast((SheetWriteHandler)writeHandler);
}
this.writeHandlerList.add(writeHandler);
} else {
if (ownSheetHandlerExecutionChain == null) {
ownSheetHandlerExecutionChain = new SheetHandlerExecutionChain((SheetWriteHandler)writeHandler);
@ -410,7 +409,6 @@ public abstract class AbstractWriteHolder extends AbstractHolder implements Writ
ownSheetHandlerExecutionChain.addLast((SheetWriteHandler)writeHandler);
}
}
return;
}
if (writeHandler instanceof WorkbookWriteHandler) {
if (!runOwn) {
@ -420,7 +418,6 @@ public abstract class AbstractWriteHolder extends AbstractHolder implements Writ
} else {
workbookHandlerExecutionChain.addLast((WorkbookWriteHandler)writeHandler);
}
this.writeHandlerList.add(writeHandler);
} else {
if (ownWorkbookHandlerExecutionChain == null) {
ownWorkbookHandlerExecutionChain = new WorkbookHandlerExecutionChain(
@ -430,6 +427,9 @@ public abstract class AbstractWriteHolder extends AbstractHolder implements Writ
}
}
}
if (!runOwn) {
this.writeHandlerList.add(writeHandler);
}
}
@Override

8
src/main/java/com/alibaba/excel/write/metadata/holder/WriteSheetHolder.java

@ -8,8 +8,10 @@ import com.alibaba.excel.enums.WriteLastRowTypeEnum;
import com.alibaba.excel.util.StringUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.streaming.SXSSFSheet;
@ -20,7 +22,9 @@ import org.apache.poi.xssf.usermodel.XSSFSheet;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@NoArgsConstructor
public class WriteSheetHolder extends AbstractWriteHolder {
/**

8
src/main/java/com/alibaba/excel/write/metadata/holder/WriteTableHolder.java

@ -3,14 +3,18 @@ package com.alibaba.excel.write.metadata.holder;
import com.alibaba.excel.enums.HolderEnum;
import com.alibaba.excel.write.metadata.WriteTable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* sheet holder
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class WriteTableHolder extends AbstractWriteHolder {
/***
* poi sheet

10
src/main/java/com/alibaba/excel/write/metadata/holder/WriteWorkbookHolder.java

@ -24,7 +24,10 @@ import com.alibaba.excel.write.metadata.WriteWorkbook;
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import com.alibaba.excel.write.metadata.style.WriteFont;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString.Exclude;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
@ -40,7 +43,9 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@Slf4j
public class WriteWorkbookHolder extends AbstractWriteHolder {
/***
@ -147,6 +152,7 @@ public class WriteWorkbookHolder extends AbstractWriteHolder {
/**
* handler context
*/
@Exclude
private WorkbookWriteHandlerContext workbookWriteHandlerContext;
public WriteWorkbookHolder(WriteWorkbook writeWorkbook) {

8
src/main/java/com/alibaba/excel/write/metadata/style/WriteCellStyle.java

@ -6,7 +6,9 @@ import com.alibaba.excel.metadata.property.FontProperty;
import com.alibaba.excel.metadata.property.StyleProperty;
import com.alibaba.excel.util.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
@ -19,7 +21,9 @@ import org.apache.poi.ss.usermodel.VerticalAlignment;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class WriteCellStyle {
/**
* Set the data format (must be a valid format). Built in formats are defined at {@link BuiltinFormats}.

8
src/main/java/com/alibaba/excel/write/metadata/style/WriteFont.java

@ -2,7 +2,9 @@ package com.alibaba.excel.write.metadata.style;
import com.alibaba.excel.util.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.poi.common.usermodel.fonts.FontCharset;
import org.apache.poi.hssf.usermodel.HSSFPalette;
import org.apache.poi.ss.usermodel.Font;
@ -13,7 +15,9 @@ import org.apache.poi.ss.usermodel.IndexedColors;
*
* @author jipengfei
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class WriteFont {
/**
* The name for the font (i.e. Arial)

8
src/main/java/com/alibaba/excel/write/property/ExcelWriteHeadProperty.java

@ -26,14 +26,18 @@ import com.alibaba.excel.metadata.property.OnceAbsoluteMergeProperty;
import com.alibaba.excel.metadata.property.RowHeightProperty;
import com.alibaba.excel.metadata.property.StyleProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* Define the header attribute of excel
*
* @author jipengfei
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ExcelWriteHeadProperty extends ExcelHeadProperty {
private RowHeightProperty headRowHeightProperty;

8
src/main/java/com/alibaba/excel/write/style/HorizontalCellStyleStrategy.java

@ -7,7 +7,9 @@ import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.handler.context.CellWriteHandlerContext;
import com.alibaba.excel.write.metadata.style.WriteCellStyle;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.collections4.CollectionUtils;
/**
@ -15,7 +17,9 @@ import org.apache.commons.collections4.CollectionUtils;
*
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class HorizontalCellStyleStrategy extends AbstractCellStyleStrategy {
private WriteCellStyle headWriteCellStyle;

8
src/test/java/com/alibaba/easyexcel/test/core/annotation/AnnotationData.java

@ -10,12 +10,16 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@ColumnWidth(50)
@HeadRowHeight(50)
@ContentRowHeight(100)

8
src/test/java/com/alibaba/easyexcel/test/core/annotation/AnnotationIndexAndNameData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.annotation;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class AnnotationIndexAndNameData {
@ExcelProperty(value = "第四个", index = 4)
private String index4;

8
src/test/java/com/alibaba/easyexcel/test/core/celldata/CellDataReadData.java

@ -3,12 +3,16 @@ package com.alibaba.easyexcel.test.core.celldata;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.metadata.data.ReadCellData;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CellDataReadData {
@DateTimeFormat("yyyy年MM月dd日")
private ReadCellData<String> date;

8
src/test/java/com/alibaba/easyexcel/test/core/celldata/CellDataWriteData.java

@ -5,12 +5,16 @@ import java.util.Date;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.metadata.data.WriteCellData;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CellDataWriteData {
@DateTimeFormat("yyyy年MM月dd日")
private WriteCellData<Date> date;

8
src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterReadData.java

@ -8,12 +8,16 @@ import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.data.ReadCellData;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ConverterReadData {
@ExcelProperty("日期")
private Date date;

8
src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterWriteData.java

@ -8,12 +8,16 @@ import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.data.WriteCellData;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ConverterWriteData {
@ExcelProperty("日期")
private Date date;

8
src/test/java/com/alibaba/easyexcel/test/core/converter/ImageData.java

@ -8,12 +8,16 @@ import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.converters.string.StringImageConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@ContentRowHeight(500)
@ColumnWidth(500 / 8)
public class ImageData {

8
src/test/java/com/alibaba/easyexcel/test/core/converter/ReadAllConverterData.java

@ -5,12 +5,16 @@ import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ReadAllConverterData {
private BigDecimal bigDecimalBoolean;
private BigDecimal bigDecimalNumber;

8
src/test/java/com/alibaba/easyexcel/test/core/dataformat/DateFormatData.java

@ -1,11 +1,15 @@
package com.alibaba.easyexcel.test.core.dataformat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class DateFormatData {
private String date;
private String dateStringCn;

8
src/test/java/com/alibaba/easyexcel/test/core/encrypt/EncryptData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.encrypt;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class EncryptData {
@ExcelProperty("姓名")
private String name;

8
src/test/java/com/alibaba/easyexcel/test/core/exception/ExceptionData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.exception;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ExceptionData {
@ExcelProperty("姓名")
private String name;

8
src/test/java/com/alibaba/easyexcel/test/core/excludeorinclude/ExcludeOrIncludeData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.excludeorinclude;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ExcludeOrIncludeData {
@ExcelProperty(order = 1)
private String column1;

8
src/test/java/com/alibaba/easyexcel/test/core/extra/ExtraData.java

@ -1,11 +1,15 @@
package com.alibaba.easyexcel.test.core.extra;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ExtraData {
private String row1;

8
src/test/java/com/alibaba/easyexcel/test/core/fill/FillData.java

@ -4,12 +4,16 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.converters.doubleconverter.DoubleStringConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class FillData {
private String name;
@NumberFormat("#")

8
src/test/java/com/alibaba/easyexcel/test/core/fill/style/FillStyleAnnotatedData.java

@ -7,12 +7,16 @@ import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.BooleanEnum;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class FillStyleAnnotatedData {
@ContentStyle(fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND, fillForegroundColor = 13)
@ContentFontStyle(bold = BooleanEnum.TRUE, color = 19)

8
src/test/java/com/alibaba/easyexcel/test/core/fill/style/FillStyleData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.fill.style;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class FillStyleData {
private String name;
private Double number;

8
src/test/java/com/alibaba/easyexcel/test/core/handler/WriteHandlerData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.handler;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class WriteHandlerData {
@ExcelProperty("姓名")
private String name;

8
src/test/java/com/alibaba/easyexcel/test/core/head/ComplexHeadData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.head;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ComplexHeadData {
@ExcelProperty({"顶格", "顶格", "两格"})
private String string0;

8
src/test/java/com/alibaba/easyexcel/test/core/head/NoHeadData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.head;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class NoHeadData {
@ExcelProperty("字符串")
private String string;

8
src/test/java/com/alibaba/easyexcel/test/core/large/LargeData.java

@ -1,11 +1,15 @@
package com.alibaba.easyexcel.test.core.large;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class LargeData {
private String str1;

8
src/test/java/com/alibaba/easyexcel/test/core/multiplesheets/MultipleSheetsData.java

@ -1,11 +1,15 @@
package com.alibaba.easyexcel.test.core.multiplesheets;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class MultipleSheetsData {
private String title;
}

8
src/test/java/com/alibaba/easyexcel/test/core/noncamel/UnCamelData.java

@ -1,11 +1,15 @@
package com.alibaba.easyexcel.test.core.noncamel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class UnCamelData {
private String string1;
private String String2;

8
src/test/java/com/alibaba/easyexcel/test/core/parameter/ParameterData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.parameter;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ParameterData {
@ExcelProperty("姓名")
private String name;

8
src/test/java/com/alibaba/easyexcel/test/core/repetition/RepetitionData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.repetition;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class RepetitionData {
@ExcelProperty("字符串")
private String string;

8
src/test/java/com/alibaba/easyexcel/test/core/simple/SimpleData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.simple;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class SimpleData {
@ExcelProperty("姓名")
private String name;

8
src/test/java/com/alibaba/easyexcel/test/core/skip/SkipData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.skip;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class SkipData {
@ExcelProperty("姓名")

8
src/test/java/com/alibaba/easyexcel/test/core/sort/SortData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.sort;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class SortData {
private String column5;
private String column6;

8
src/test/java/com/alibaba/easyexcel/test/core/style/StyleData.java

@ -4,12 +4,16 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
@HeadStyle
@HeadFontStyle
public class StyleData {

8
src/test/java/com/alibaba/easyexcel/test/core/template/TemplateData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.core.template;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class TemplateData {
@ExcelProperty("字符串0")
private String string0;

8
src/test/java/com/alibaba/easyexcel/test/demo/fill/FillData.java

@ -2,12 +2,16 @@ package com.alibaba.easyexcel.test.demo.fill;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class FillData {
private String name;
private double number;

8
src/test/java/com/alibaba/easyexcel/test/demo/read/CellDataReadDemoData.java

@ -4,14 +4,18 @@ import java.util.Date;
import com.alibaba.excel.metadata.data.CellData;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* 基础数据类.这里的排序和excel里面的排序一致
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class CellDataReadDemoData {
private CellData<String> string;
// 这里注意 虽然是日期 但是 类型 存储的是number 因为excel 存储的就是number

8
src/test/java/com/alibaba/easyexcel/test/demo/read/ConverterData.java

@ -4,14 +4,18 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* 基础数据类.这里的排序和excel里面的排序一致
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ConverterData {
/**
* 我自定义 转换器不管数据库传过来什么 我给他加上自定义

8
src/test/java/com/alibaba/easyexcel/test/demo/read/DemoData.java

@ -2,14 +2,18 @@ package com.alibaba.easyexcel.test.demo.read;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* 基础数据类.这里的排序和excel里面的排序一致
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class DemoData {
private String string;
private Date date;

8
src/test/java/com/alibaba/easyexcel/test/demo/read/DemoExtraData.java

@ -1,11 +1,15 @@
package com.alibaba.easyexcel.test.demo.read;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* @author Jiaju Zhuang
*/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class DemoExtraData {
private String row1;

8
src/test/java/com/alibaba/easyexcel/test/demo/read/ExceptionDemoData.java

@ -2,14 +2,18 @@ package com.alibaba.easyexcel.test.demo.read;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
/**
* 基础数据类.这里的排序和excel里面的排序一致
*
* @author Jiaju Zhuang
**/
@Data
@Getter
@Setter
@EqualsAndHashCode
public class ExceptionDemoData {
/**
* 用日期去接字符串 肯定报错

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save