@ -1,5 +1,7 @@
# easyexcel核心功能
## 目录
### 前言
读写的对象都用到了[Lombok](https://www.projectlombok.org/),他会自动生成`get`,`set` ,如果不需要自己创建对象并生成`get`,`set` 。
### 读
DEMO代码地址:[https://github.com/alibaba/easyexcel/blob/master/src/test/java/com/alibaba/easyexcel/demo/read/ReadTest.java](/src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java)
* [最简单的读](#simpleRead)
@ -1,6 +1,5 @@
package com.alibaba.excel.metadata;
import java.util.ArrayList;
import java.util.List;
import com.alibaba.excel.converters.Converter;
@ -22,7 +21,7 @@ public class BasicParameter {
/**
* Custom type conversions override the default
*/
private List<Converter> customConverterList = new ArrayList<Converter>();
private List<Converter> customConverterList;
* Automatic trim includes sheet name and content
@ -10,6 +10,8 @@ public class BooleanUtils {
private static final String TRUE_NUMBER = "1";
private static final String FALSE_NUMBER = "0";
private BooleanUtils() {}
* String to boolean
*
@ -10,6 +10,8 @@ import java.util.Map;
public class CollectionUtils {
private CollectionUtils() {}
public static boolean isEmpty(Collection<?> collection) {
return (collection == null || collection.isEmpty());
}
@ -25,6 +25,8 @@ public class FileUtils {
private static final String CACHE = "excache";
private static final int WRITE_BUFF_SIZE = 8192;
private FileUtils() {}
* Reads the contents of a file into a byte array. * The file is always closed.
@ -17,6 +17,8 @@ public class IoUtils {
private static final int DEFAULT_BUFFER_SIZE = 1024 * 4;
private IoUtils() {}
* Gets the contents of an InputStream as a byte[].
@ -5,6 +5,8 @@ package com.alibaba.excel.util;
public class PositionUtils {
private PositionUtils() {}
public static int getRow(String currentCellIndex) {
int row = 0;
if (currentCellIndex != null) {
@ -7,6 +7,8 @@ package com.alibaba.excel.util;
public class StringUtils {
private StringUtils() {}
public static boolean isEmpty(Object str) {
return (str == null || "".equals(str));
@ -17,6 +17,8 @@ import com.alibaba.excel.write.metadata.style.WriteFont;
public class StyleUtil {
private StyleUtil() {}
* @param workbook
* @return
@ -22,6 +22,8 @@ import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder;
public class WorkBookUtil {
private WorkBookUtil() {}
public static Workbook createWorkBook(WriteWorkbookHolder writeWorkbookHolder)
throws IOException, InvalidFormatException {
if (ExcelTypeEnum.XLSX.equals(writeWorkbookHolder.getExcelType())) {