From 3f78c57e813f96e4e677a3f168c9ece8ce91a7af Mon Sep 17 00:00:00 2001 From: zhuangjiaju Date: Mon, 19 Aug 2019 18:59:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=BB=E5=86=99=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../excel/converters/ConverterKeyBuild.java | 28 +++++- .../converters/DefaultConverterLoader.java | 10 ++- .../BoxingByteArrayImageConverter.java | 41 +++++++++ .../bytearray/ByteArrayImageConverter.java | 37 ++++++++ .../converters/file/FileImageConverter.java | 41 +++++++++ .../InputStreamImageConverter.java | 41 +++++++++ .../string/StringImageConverter.java | 41 +++++++++ .../alibaba/excel/enums/CellDataTypeEnum.java | 6 +- .../com/alibaba/excel/metadata/CellData.java | 23 ++++- .../com/alibaba/excel/util/FileUtils.java | 46 ++++++++++ .../java/com/alibaba/excel/util/IOUtils.java | 85 ++++++++++++++++++ .../alibaba/excel/write/ExcelBuilderImpl.java | 29 ++++++ .../SimpleColumnWidthStyleStrategy.java | 1 - .../test/core/converter/ConverterData.java | 4 +- .../core/converter/ConverterDataTest.java | 40 ++++++++- .../test/core/converter/ImageData.java | 25 ++++++ .../easyexcel/test/temp/StyleData.java | 20 +++++ .../easyexcel/test/temp/StyleTest.java | 20 +++++ .../easyexcel/test/util/TestFileUtil.java | 8 +- src/test/resources/converter/img.jpg | Bin 0 -> 11972 bytes 20 files changed, 529 insertions(+), 17 deletions(-) create mode 100644 src/main/java/com/alibaba/excel/converters/bytearray/BoxingByteArrayImageConverter.java create mode 100644 src/main/java/com/alibaba/excel/converters/bytearray/ByteArrayImageConverter.java create mode 100644 src/main/java/com/alibaba/excel/converters/file/FileImageConverter.java create mode 100644 src/main/java/com/alibaba/excel/converters/inputstream/InputStreamImageConverter.java create mode 100644 src/main/java/com/alibaba/excel/converters/string/StringImageConverter.java create mode 100644 src/main/java/com/alibaba/excel/util/IOUtils.java create mode 100644 src/test/java/com/alibaba/easyexcel/test/core/converter/ImageData.java create mode 100644 src/test/java/com/alibaba/easyexcel/test/temp/StyleData.java create mode 100644 src/test/resources/converter/img.jpg diff --git a/src/main/java/com/alibaba/excel/converters/ConverterKeyBuild.java b/src/main/java/com/alibaba/excel/converters/ConverterKeyBuild.java index 74eb490..0bd5499 100644 --- a/src/main/java/com/alibaba/excel/converters/ConverterKeyBuild.java +++ b/src/main/java/com/alibaba/excel/converters/ConverterKeyBuild.java @@ -1,18 +1,40 @@ package com.alibaba.excel.converters; +import java.util.HashMap; +import java.util.Map; + import com.alibaba.excel.enums.CellDataTypeEnum; /** - * Converter unique key + * Converter unique key.Consider that you can just use class as the key. * * @author Jiaju Zhuang */ public class ConverterKeyBuild { + + private static final Map BOXING_MAP = new HashMap(16); + + static { + BOXING_MAP.put(int.class.getName(), Integer.class.getName()); + BOXING_MAP.put(byte.class.getName(), Byte.class.getName()); + BOXING_MAP.put(long.class.getName(), Long.class.getName()); + BOXING_MAP.put(double.class.getName(), Double.class.getName()); + BOXING_MAP.put(float.class.getName(), Float.class.getName()); + BOXING_MAP.put(char.class.getName(), Character.class.getName()); + BOXING_MAP.put(short.class.getName(), Short.class.getName()); + BOXING_MAP.put(boolean.class.getName(), Boolean.class.getName()); + } + public static String buildKey(Class clazz) { - return clazz.getName(); + String className = clazz.getName(); + String boxingClassName = BOXING_MAP.get(clazz.getName()); + if (boxingClassName == null) { + return className; + } + return boxingClassName; } public static String buildKey(Class clazz, CellDataTypeEnum cellDataTypeEnum) { - return clazz.getName() + "-" + cellDataTypeEnum.toString(); + return buildKey(clazz) + "-" + cellDataTypeEnum.toString(); } } diff --git a/src/main/java/com/alibaba/excel/converters/DefaultConverterLoader.java b/src/main/java/com/alibaba/excel/converters/DefaultConverterLoader.java index 0bbf8f0..e53c1f8 100644 --- a/src/main/java/com/alibaba/excel/converters/DefaultConverterLoader.java +++ b/src/main/java/com/alibaba/excel/converters/DefaultConverterLoader.java @@ -9,6 +9,8 @@ import com.alibaba.excel.converters.bigdecimal.BigDecimalStringConverter; import com.alibaba.excel.converters.booleanconverter.BooleanBooleanConverter; import com.alibaba.excel.converters.booleanconverter.BooleanNumberConverter; import com.alibaba.excel.converters.booleanconverter.BooleanStringConverter; +import com.alibaba.excel.converters.bytearray.BoxingByteArrayImageConverter; +import com.alibaba.excel.converters.bytearray.ByteArrayImageConverter; import com.alibaba.excel.converters.byteconverter.ByteBooleanConverter; import com.alibaba.excel.converters.byteconverter.ByteNumberConverter; import com.alibaba.excel.converters.byteconverter.ByteStringConverter; @@ -17,9 +19,11 @@ import com.alibaba.excel.converters.date.DateStringConverter; import com.alibaba.excel.converters.doubleconverter.DoubleBooleanConverter; import com.alibaba.excel.converters.doubleconverter.DoubleNumberConverter; import com.alibaba.excel.converters.doubleconverter.DoubleStringConverter; +import com.alibaba.excel.converters.file.FileImageConverter; import com.alibaba.excel.converters.floatconverter.FloatBooleanConverter; import com.alibaba.excel.converters.floatconverter.FloatNumberConverter; import com.alibaba.excel.converters.floatconverter.FloatStringConverter; +import com.alibaba.excel.converters.inputstream.InputStreamImageConverter; import com.alibaba.excel.converters.integer.IntegerBooleanConverter; import com.alibaba.excel.converters.integer.IntegerNumberConverter; import com.alibaba.excel.converters.integer.IntegerStringConverter; @@ -52,7 +56,7 @@ public class DefaultConverterLoader { if (defaultWriteConverter != null) { return defaultWriteConverter; } - defaultWriteConverter = new HashMap(16); + defaultWriteConverter = new HashMap(32); putWriteConverter(new BigDecimalNumberConverter()); putWriteConverter(new BooleanBooleanConverter()); putWriteConverter(new ByteNumberConverter()); @@ -63,6 +67,10 @@ public class DefaultConverterLoader { putWriteConverter(new LongNumberConverter()); putWriteConverter(new ShortNumberConverter()); putWriteConverter(new StringStringConverter()); + putWriteConverter(new FileImageConverter()); + putWriteConverter(new InputStreamImageConverter()); + putWriteConverter(new ByteArrayImageConverter()); + putWriteConverter(new BoxingByteArrayImageConverter()); return defaultWriteConverter; } diff --git a/src/main/java/com/alibaba/excel/converters/bytearray/BoxingByteArrayImageConverter.java b/src/main/java/com/alibaba/excel/converters/bytearray/BoxingByteArrayImageConverter.java new file mode 100644 index 0000000..c083601 --- /dev/null +++ b/src/main/java/com/alibaba/excel/converters/bytearray/BoxingByteArrayImageConverter.java @@ -0,0 +1,41 @@ +package com.alibaba.excel.converters.bytearray; + +import com.alibaba.excel.converters.Converter; +import com.alibaba.excel.enums.CellDataTypeEnum; +import com.alibaba.excel.metadata.CellData; +import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.property.ExcelContentProperty; + +/** + * Boxing Byte array and image converter + * + * @author Jiaju Zhuang + */ +public class BoxingByteArrayImageConverter implements Converter { + @Override + public Class supportJavaTypeKey() { + return Byte[].class; + } + + @Override + public CellDataTypeEnum supportExcelTypeKey() { + return CellDataTypeEnum.IMAGE; + } + + @Override + public Byte[] convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { + throw new UnsupportedOperationException("Cannot convert images to byte arrays"); + } + + @Override + public CellData convertToExcelData(Byte[] value, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { + byte[] byteValue = new byte[value.length]; + for (int i = 0; i < value.length; i++) { + byteValue[i] = value[i]; + } + return new CellData(byteValue); + } + +} diff --git a/src/main/java/com/alibaba/excel/converters/bytearray/ByteArrayImageConverter.java b/src/main/java/com/alibaba/excel/converters/bytearray/ByteArrayImageConverter.java new file mode 100644 index 0000000..991999d --- /dev/null +++ b/src/main/java/com/alibaba/excel/converters/bytearray/ByteArrayImageConverter.java @@ -0,0 +1,37 @@ +package com.alibaba.excel.converters.bytearray; + +import com.alibaba.excel.converters.Converter; +import com.alibaba.excel.enums.CellDataTypeEnum; +import com.alibaba.excel.metadata.CellData; +import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.property.ExcelContentProperty; + +/** + * Byte array and image converter + * + * @author Jiaju Zhuang + */ +public class ByteArrayImageConverter implements Converter { + @Override + public Class supportJavaTypeKey() { + return byte[].class; + } + + @Override + public CellDataTypeEnum supportExcelTypeKey() { + return CellDataTypeEnum.IMAGE; + } + + @Override + public byte[] convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { + throw new UnsupportedOperationException("Cannot convert images to byte arrays"); + } + + @Override + public CellData convertToExcelData(byte[] value, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { + return new CellData(value); + } + +} diff --git a/src/main/java/com/alibaba/excel/converters/file/FileImageConverter.java b/src/main/java/com/alibaba/excel/converters/file/FileImageConverter.java new file mode 100644 index 0000000..1052215 --- /dev/null +++ b/src/main/java/com/alibaba/excel/converters/file/FileImageConverter.java @@ -0,0 +1,41 @@ +package com.alibaba.excel.converters.file; + +import java.io.File; +import java.io.IOException; + +import com.alibaba.excel.converters.Converter; +import com.alibaba.excel.enums.CellDataTypeEnum; +import com.alibaba.excel.metadata.CellData; +import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.property.ExcelContentProperty; +import com.alibaba.excel.util.FileUtils; + +/** + * File and image converter + * + * @author Jiaju Zhuang + */ +public class FileImageConverter implements Converter { + @Override + public Class supportJavaTypeKey() { + return File.class; + } + + @Override + public CellDataTypeEnum supportExcelTypeKey() { + return CellDataTypeEnum.IMAGE; + } + + @Override + public File convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { + throw new UnsupportedOperationException("Cannot convert images to file"); + } + + @Override + public CellData convertToExcelData(File value, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) throws IOException { + return new CellData(FileUtils.readFileToByteArray(value)); + } + +} diff --git a/src/main/java/com/alibaba/excel/converters/inputstream/InputStreamImageConverter.java b/src/main/java/com/alibaba/excel/converters/inputstream/InputStreamImageConverter.java new file mode 100644 index 0000000..0e28b41 --- /dev/null +++ b/src/main/java/com/alibaba/excel/converters/inputstream/InputStreamImageConverter.java @@ -0,0 +1,41 @@ +package com.alibaba.excel.converters.inputstream; + +import java.io.IOException; +import java.io.InputStream; + +import com.alibaba.excel.converters.Converter; +import com.alibaba.excel.enums.CellDataTypeEnum; +import com.alibaba.excel.metadata.CellData; +import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.property.ExcelContentProperty; +import com.alibaba.excel.util.IOUtils; + +/** + * File and image converter + * + * @author Jiaju Zhuang + */ +public class InputStreamImageConverter implements Converter { + @Override + public Class supportJavaTypeKey() { + return InputStream.class; + } + + @Override + public CellDataTypeEnum supportExcelTypeKey() { + return CellDataTypeEnum.IMAGE; + } + + @Override + public InputStream convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { + throw new UnsupportedOperationException("Cannot convert images to input stream"); + } + + @Override + public CellData convertToExcelData(InputStream value, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) throws IOException { + return new CellData(IOUtils.toByteArray(value)); + } + +} diff --git a/src/main/java/com/alibaba/excel/converters/string/StringImageConverter.java b/src/main/java/com/alibaba/excel/converters/string/StringImageConverter.java new file mode 100644 index 0000000..931d4fa --- /dev/null +++ b/src/main/java/com/alibaba/excel/converters/string/StringImageConverter.java @@ -0,0 +1,41 @@ +package com.alibaba.excel.converters.string; + +import java.io.File; +import java.io.IOException; + +import com.alibaba.excel.converters.Converter; +import com.alibaba.excel.enums.CellDataTypeEnum; +import com.alibaba.excel.metadata.CellData; +import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.property.ExcelContentProperty; +import com.alibaba.excel.util.FileUtils; + +/** + * String and image converter + * + * @author Jiaju Zhuang + */ +public class StringImageConverter implements Converter { + @Override + public Class supportJavaTypeKey() { + return String.class; + } + + @Override + public CellDataTypeEnum supportExcelTypeKey() { + return CellDataTypeEnum.IMAGE; + } + + @Override + public String convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) { + throw new UnsupportedOperationException("Cannot convert images to string"); + } + + @Override + public CellData convertToExcelData(String value, ExcelContentProperty contentProperty, + GlobalConfiguration globalConfiguration) throws IOException { + return new CellData(FileUtils.readFileToByteArray(new File(value))); + } + +} diff --git a/src/main/java/com/alibaba/excel/enums/CellDataTypeEnum.java b/src/main/java/com/alibaba/excel/enums/CellDataTypeEnum.java index d89ae42..44efc17 100644 --- a/src/main/java/com/alibaba/excel/enums/CellDataTypeEnum.java +++ b/src/main/java/com/alibaba/excel/enums/CellDataTypeEnum.java @@ -35,7 +35,11 @@ public enum CellDataTypeEnum { /** * error */ - ERROR; + ERROR, + /** + * Images are currently supported only when writing + */ + IMAGE; private static final Map TYPE_ROUTING_MAP = new HashMap(16); static { diff --git a/src/main/java/com/alibaba/excel/metadata/CellData.java b/src/main/java/com/alibaba/excel/metadata/CellData.java index e03a883..7cd1103 100644 --- a/src/main/java/com/alibaba/excel/metadata/CellData.java +++ b/src/main/java/com/alibaba/excel/metadata/CellData.java @@ -23,12 +23,13 @@ public class CellData { private Boolean booleanValue; private Boolean formula; private String formulaValue; + private byte[] imageValue; /** - * The number formatting + * The number formatting.Currently only supported when reading */ private Integer dataFormat; /** - * The string of number formatting + * The string of number formatting.Currently only supported when reading */ private String dataFormatString; @@ -39,6 +40,7 @@ public class CellData { this.booleanValue = other.booleanValue; this.formula = other.formula; this.formulaValue = other.formulaValue; + this.imageValue = other.imageValue; this.dataFormat = other.dataFormat; this.dataFormatString = other.dataFormatString; } @@ -68,6 +70,15 @@ public class CellData { this.formula = Boolean.FALSE; } + public CellData(byte[] imageValue) { + if (imageValue == null) { + throw new IllegalArgumentException("ImageValue can not be null"); + } + this.type = CellDataTypeEnum.IMAGE; + this.imageValue = imageValue; + this.formula = Boolean.FALSE; + } + public CellData(Boolean booleanValue) { if (booleanValue == null) { throw new IllegalArgumentException("BooleanValue can not be null"); @@ -133,6 +144,14 @@ public class CellData { this.formulaValue = formulaValue; } + public byte[] getImageValue() { + return imageValue; + } + + public void setImageValue(byte[] imageValue) { + this.imageValue = imageValue; + } + public Integer getDataFormat() { return dataFormat; } diff --git a/src/main/java/com/alibaba/excel/util/FileUtils.java b/src/main/java/com/alibaba/excel/util/FileUtils.java index 0a76a65..26327b3 100644 --- a/src/main/java/com/alibaba/excel/util/FileUtils.java +++ b/src/main/java/com/alibaba/excel/util/FileUtils.java @@ -1,6 +1,8 @@ package com.alibaba.excel.util; import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; @@ -23,6 +25,50 @@ public class FileUtils { private static final String CACHE = "excache"; private static final int WRITE_BUFF_SIZE = 8192; + /** + * Reads the contents of a file into a byte array. * The file is always closed. + * + * @param file + * @return + * @throws IOException + */ + public static byte[] readFileToByteArray(final File file) throws IOException { + InputStream in = openInputStream(file); + try { + final long fileLength = file.length(); + return fileLength > 0 ? IOUtils.toByteArray(in, (int)fileLength) : IOUtils.toByteArray(in); + } finally { + in.close(); + } + } + + /** + * Opens a {@link FileInputStream} for the specified file, providing better error messages than simply calling + * new FileInputStream(file). + *

+ * At the end of the method either the stream will be successfully opened, or an exception will have been thrown. + *

+ * An exception is thrown if the file does not exist. An exception is thrown if the file object exists but is a + * directory. An exception is thrown if the file exists but cannot be read. + * + * @param file + * @return + * @throws IOException + */ + public static FileInputStream openInputStream(final File file) throws IOException { + if (file.exists()) { + if (file.isDirectory()) { + throw new IOException("File '" + file + "' exists but is a directory"); + } + if (file.canRead() == false) { + throw new IOException("File '" + file + "' cannot be read"); + } + } else { + throw new FileNotFoundException("File '" + file + "' does not exist"); + } + return new FileInputStream(file); + } + /** * Write inputStream to file * diff --git a/src/main/java/com/alibaba/excel/util/IOUtils.java b/src/main/java/com/alibaba/excel/util/IOUtils.java new file mode 100644 index 0000000..dc41531 --- /dev/null +++ b/src/main/java/com/alibaba/excel/util/IOUtils.java @@ -0,0 +1,85 @@ +package com.alibaba.excel.util; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +/** + * IO Utils + * + * @author Jiaju Zhuang + */ +public class IOUtils { + public static final int EOF = -1; + /** + * The default buffer size ({@value}) to use for + */ + private static final int DEFAULT_BUFFER_SIZE = 1024 * 4; + + /** + * Gets the contents of an InputStream as a byte[]. + * + * @param input + * @return + * @throws IOException + */ + public static byte[] toByteArray(final InputStream input) throws IOException { + final ByteArrayOutputStream output = new ByteArrayOutputStream(); + try { + copy(input, output); + return output.toByteArray(); + } finally { + output.toByteArray(); + } + } + + /** + * Gets the contents of an InputStream as a byte[]. + * + * @param input + * @param size + * @return + * @throws IOException + */ + public static byte[] toByteArray(final InputStream input, final int size) throws IOException { + if (size < 0) { + throw new IllegalArgumentException("Size must be equal or greater than zero: " + size); + } + if (size == 0) { + return new byte[0]; + } + final byte[] data = new byte[size]; + int offset = 0; + int read; + while (offset < size && (read = input.read(data, offset, size - offset)) != EOF) { + offset += read; + } + if (offset != size) { + throw new IOException("Unexpected read size. current: " + offset + ", expected: " + size); + } + return data; + } + + /** + * Copies bytes + * + * @param input + * @param output + * @return + * @throws IOException + */ + public static int copy(final InputStream input, final OutputStream output) throws IOException { + long count = 0; + int n; + byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; + while (EOF != (n = input.read(buffer))) { + output.write(buffer, 0, n); + count += n; + } + if (count > Integer.MAX_VALUE) { + return -1; + } + return (int)count; + } +} diff --git a/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java b/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java index 970fd3c..e619e37 100644 --- a/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java +++ b/src/main/java/com/alibaba/excel/write/ExcelBuilderImpl.java @@ -8,8 +8,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.ClientAnchor; +import org.apache.poi.ss.usermodel.CreationHelper; +import org.apache.poi.ss.usermodel.Drawing; import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.util.CellRangeAddress; import com.alibaba.excel.context.WriteContext; @@ -303,12 +308,36 @@ public class ExcelBuilderImpl implements ExcelBuilder { case NUMBER: cell.setCellValue(cellData.getDoubleValue()); return cellData; + case IMAGE: + setImageValue(cellData, cell); + return cellData; default: throw new ExcelDataConvertException("Not supported data:" + value + " return type:" + cell.getCellType() + "at row:" + cell.getRow().getRowNum()); } } + private void setImageValue(CellData cellData, Cell cell) { + Sheet sheet = cell.getSheet(); + int index = sheet.getWorkbook().addPicture(cellData.getImageValue(), HSSFWorkbook.PICTURE_TYPE_PNG); + Drawing drawing = sheet.getDrawingPatriarch(); + if (drawing == null) { + drawing = sheet.createDrawingPatriarch(); + } + CreationHelper helper = sheet.getWorkbook().getCreationHelper(); + ClientAnchor anchor = helper.createClientAnchor(); + anchor.setDx1(0); + anchor.setDx2(0); + anchor.setDy1(0); + anchor.setDy2(0); + anchor.setCol1(cell.getColumnIndex()); + anchor.setCol2(cell.getColumnIndex() + 1); + anchor.setRow1(cell.getRowIndex()); + anchor.setRow2(cell.getRowIndex() + 1); + anchor.setAnchorType(ClientAnchor.AnchorType.DONT_MOVE_AND_RESIZE); + drawing.createPicture(anchor, index); + } + private CellData convert(WriteHolder currentWriteHolder, Class clazz, Cell cell, Object value, ExcelContentProperty excelContentProperty) { if (value instanceof CellData) { diff --git a/src/main/java/com/alibaba/excel/write/style/column/SimpleColumnWidthStyleStrategy.java b/src/main/java/com/alibaba/excel/write/style/column/SimpleColumnWidthStyleStrategy.java index 9b1b903..1f3ae78 100644 --- a/src/main/java/com/alibaba/excel/write/style/column/SimpleColumnWidthStyleStrategy.java +++ b/src/main/java/com/alibaba/excel/write/style/column/SimpleColumnWidthStyleStrategy.java @@ -13,7 +13,6 @@ public class SimpleColumnWidthStyleStrategy extends AbstractHeadColumnWidthStyle /** * * @param columnWidth - * */ public SimpleColumnWidthStyleStrategy(Integer columnWidth) { this.columnWidth = columnWidth; diff --git a/src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterData.java b/src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterData.java index da41aaa..8846947 100644 --- a/src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterData.java +++ b/src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterData.java @@ -20,7 +20,7 @@ public class ConverterData { @ExcelProperty("大数") private BigDecimal bigDecimal; @ExcelProperty("长整型") - private Long longData; + private long longData; @ExcelProperty("整型") private Integer integerData; @ExcelProperty("短整型") @@ -28,7 +28,7 @@ public class ConverterData { @ExcelProperty("字节型") private Byte byteData; @ExcelProperty("双精度浮点型") - private Double doubleData; + private double doubleData; @ExcelProperty("浮点型") private Float floatData; @ExcelProperty("字符串") diff --git a/src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterDataTest.java b/src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterDataTest.java index 85f5f39..a223e25 100644 --- a/src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterDataTest.java +++ b/src/test/java/com/alibaba/easyexcel/test/core/converter/ConverterDataTest.java @@ -1,6 +1,7 @@ package com.alibaba.easyexcel.test.core.converter; import java.io.File; +import java.io.InputStream; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; @@ -12,9 +13,9 @@ import org.junit.runners.MethodSorters; import com.alibaba.easyexcel.test.util.TestFileUtil; import com.alibaba.excel.EasyExcel; -import com.alibaba.excel.EasyExcel; import com.alibaba.excel.metadata.CellData; import com.alibaba.excel.util.DateUtils; +import com.alibaba.excel.util.FileUtils; /** * @@ -25,11 +26,15 @@ public class ConverterDataTest { private static File file07; private static File file03; + private static File fileImage07; + private static File fileImage03; @BeforeClass public static void init() { file07 = TestFileUtil.createNewFile("converter07.xlsx"); file03 = TestFileUtil.createNewFile("converter03.xls"); + fileImage07 = TestFileUtil.createNewFile("converterImage07.xlsx"); + fileImage03 = TestFileUtil.createNewFile("converterImage03.xls"); } @Test @@ -57,9 +62,38 @@ public class ConverterDataTest { readAllConverter("converter" + File.separator + "converter03.xls"); } + @Test + public void T05WriteImage07() throws Exception { + writeImage(fileImage07); + } + + @Test + public void T06WriteImage03() throws Exception { + writeImage(fileImage03); + } + + private void writeImage(File file) throws Exception { + InputStream inputStream = null; + try { + List list = new ArrayList(); + ImageData imageData = new ImageData(); + list.add(imageData); + String imagePath = TestFileUtil.getPath() + "converter" + File.separator + "img.jpg"; + imageData.setByteArray(FileUtils.readFileToByteArray(new File(imagePath))); + imageData.setFile(new File(imagePath)); + imageData.setString(imagePath); + inputStream = FileUtils.openInputStream(new File(imagePath)); + imageData.setInputStream(inputStream); + EasyExcel.write(file, ImageData.class).sheet().doWrite(list); + } finally { + if (inputStream != null) { + inputStream.close(); + } + } + } + private void readAllConverter(String fileName) { - EasyExcel - .read(TestFileUtil.readFile(fileName), ReadAllConverterData.class, new ReadAllConverterDataListener()) + EasyExcel.read(TestFileUtil.readFile(fileName), ReadAllConverterData.class, new ReadAllConverterDataListener()) .sheet().doRead(); } diff --git a/src/test/java/com/alibaba/easyexcel/test/core/converter/ImageData.java b/src/test/java/com/alibaba/easyexcel/test/core/converter/ImageData.java new file mode 100644 index 0000000..f8d6ac2 --- /dev/null +++ b/src/test/java/com/alibaba/easyexcel/test/core/converter/ImageData.java @@ -0,0 +1,25 @@ +package com.alibaba.easyexcel.test.core.converter; + +import java.io.File; +import java.io.InputStream; + +import com.alibaba.excel.annotation.ExcelProperty; +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; + +/** + * @author Jiaju Zhuang + */ +@Data +@ContentRowHeight(500) +@ColumnWidth(500 / 8) +public class ImageData { + private File file; + private InputStream inputStream; + @ExcelProperty(converter = StringImageConverter.class) + private String string; + private byte[] byteArray; +} diff --git a/src/test/java/com/alibaba/easyexcel/test/temp/StyleData.java b/src/test/java/com/alibaba/easyexcel/test/temp/StyleData.java new file mode 100644 index 0000000..8921492 --- /dev/null +++ b/src/test/java/com/alibaba/easyexcel/test/temp/StyleData.java @@ -0,0 +1,20 @@ +package com.alibaba.easyexcel.test.temp; + +import java.util.List; + +import lombok.Data; + +/** + * + * @author Jiaju Zhuang + **/ +@Data +public class StyleData { + private byte[] byteValue; + private Byte[] byteValue2; + private byte byteValue1; + private Byte byteValue4; + private byte byteValue3; + private String[] ss; + private List s1s; +} diff --git a/src/test/java/com/alibaba/easyexcel/test/temp/StyleTest.java b/src/test/java/com/alibaba/easyexcel/test/temp/StyleTest.java index b6598b3..edabcec 100644 --- a/src/test/java/com/alibaba/easyexcel/test/temp/StyleTest.java +++ b/src/test/java/com/alibaba/easyexcel/test/temp/StyleTest.java @@ -2,6 +2,7 @@ package com.alibaba.easyexcel.test.temp; import java.io.FileInputStream; import java.io.InputStream; +import java.lang.reflect.Field; import java.util.Date; import java.util.List; @@ -18,6 +19,7 @@ import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; +import org.apache.tomcat.util.http.fileupload.IOUtils; import org.junit.Ignore; import org.junit.Test; import org.slf4j.Logger; @@ -118,6 +120,24 @@ public class StyleTest { System.out.println(ff.format(new Date())); } + @Test + public void testFormatter2() throws Exception { + StyleData styleData = new StyleData(); + Field field = styleData.getClass().getDeclaredField("byteValue"); + LOGGER.info("filed:{}", field.getType().getName()); + field = styleData.getClass().getDeclaredField("byteValue2"); + LOGGER.info("filed:{}", field.getType().getName()); + field = styleData.getClass().getDeclaredField("byteValue4"); + LOGGER.info("filed:{}", field.getType()); + field = styleData.getClass().getDeclaredField("byteValue3"); + LOGGER.info("filed:{}", field.getType()); + } + + @Test + public void testFormatter3() throws Exception { + LOGGER.info("filed:{}", Byte.class == Byte.class); + } + private void isDate(Cell cell) { System.out.println( DateUtil.isADateFormat(cell.getCellStyle().getDataFormat(), cell.getCellStyle().getDataFormatString())); diff --git a/src/test/java/com/alibaba/easyexcel/test/util/TestFileUtil.java b/src/test/java/com/alibaba/easyexcel/test/util/TestFileUtil.java index e43bdde..2031e70 100644 --- a/src/test/java/com/alibaba/easyexcel/test/util/TestFileUtil.java +++ b/src/test/java/com/alibaba/easyexcel/test/util/TestFileUtil.java @@ -13,10 +13,6 @@ public class TestFileUtil { return TestFileUtil.class.getResource("/").getPath(); } - public static File readFile(String pathName) { - return new File(getPath() + pathName); - } - public static File createNewFile(String pathName) { File file = new File(getPath() + pathName); if (file.exists()) { @@ -29,4 +25,8 @@ public class TestFileUtil { return file; } + public static File readFile(String pathName) { + return new File(getPath() + pathName); + } + } diff --git a/src/test/resources/converter/img.jpg b/src/test/resources/converter/img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..953f39f346ae1da8e045670fa72b542d7dd828d0 GIT binary patch literal 11972 zcmb7qby$>5)c3tKOT*Gq(y&N(EsY?sbO?fUNP~2TbV+x&NJ&bAAdQ5ibV^7`7`%%< z&-1?DpWoT*VrI|GIp;TXV(z(@yZO5{0AES|u{;0*0RRZ`0q&Ln832rqj){&2#>BwH z!UALCk>lgx;^I-0kP?zJ&@wU7)6zd=;SlCxVH03~NY5k7BOodcgTa`%jxg(Lj|ECkp4#? zBxDpcbPQC)COtfP{~XkKpY80ESkSleJ2dj`(N+u=Fqq48g@> z8SS6p<`$ICD1?DEwPtzv##%wpFj@c-i0tvGSZiph=Cd?niyqaLn1r&R(gO8Cig38O z2@J?YmBx^Hds>*S z)Fc`RH@73B&l6MEVu8!s!_FR;kpt}8$I=P; zL!m$*a1W>$F$91hETvnYUdt$f6yef=wiZJrw>K{?Hrwp0r%(V$egbPOz>1j6daoQQ zK^ca2IQ3dVNroONVF;OUB(WuS%l@L9(o`QT!%H{j8n|dKl)< zO_0*F8f-Q0!w(UIjLQ_Sro>TPc*Aqu`Jj+6AdK#k@g|gqwOv351A!HUE0r~P2>|BO zkozP9;Fuiz6SdxM8)Zyl)xJMaQCN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