diff --git a/README.md b/README.md index 5c8b36a5..f8fbe2e5 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,9 @@ Java解析、生成Excel比较有名的框架有Apache poi、jxl。但他们都 * 3+ 版本至少 Java8 ### 关于版本升级 * 不建议夸大版本升级 尤其夸2个大版本 -* 2+ 升级到3+ +* 2+ 升级到 3+ * 使用了自定义拦截器去修改样式的会出问题 -* 升级后建议相关内容重新测试下 +* 大版本升级后建议相关内容重新测试下 ## 人员招募 由于工作较忙,有意愿做开源的同学可以报名,主要负责群里回答&issue处理,当然也可以做一些PR. diff --git a/src/main/java/com/alibaba/excel/read/metadata/holder/ReadSheetHolder.java b/src/main/java/com/alibaba/excel/read/metadata/holder/ReadSheetHolder.java index 61b17587..558bec57 100644 --- a/src/main/java/com/alibaba/excel/read/metadata/holder/ReadSheetHolder.java +++ b/src/main/java/com/alibaba/excel/read/metadata/holder/ReadSheetHolder.java @@ -74,10 +74,10 @@ public class ReadSheetHolder extends AbstractReadHolder { } /** - * Approximate total number of rows + * Approximate total number of rows. + * use: getApproximateTotalRowNumber() * * @return - * @see #getApproximateTotalRowNumber() */ @Deprecated public Integer getTotal() { diff --git a/src/main/java/com/alibaba/excel/util/BeanMapUtils.java b/src/main/java/com/alibaba/excel/util/BeanMapUtils.java index 4b60743f..eab4a70f 100644 --- a/src/main/java/com/alibaba/excel/util/BeanMapUtils.java +++ b/src/main/java/com/alibaba/excel/util/BeanMapUtils.java @@ -17,7 +17,7 @@ public class BeanMapUtils { * BeanMap.Generator instead of this static method. * * Custom naming policy to prevent null pointer exceptions. - * https://github.com/alibaba/easyexcel/issues/2064 + * see: https://github.com/alibaba/easyexcel/issues/2064 * * @param bean the JavaBean underlying the map * @return a new BeanMap instance diff --git a/src/main/java/com/alibaba/excel/util/FieldUtils.java b/src/main/java/com/alibaba/excel/util/FieldUtils.java index fd692235..a5c75731 100644 --- a/src/main/java/com/alibaba/excel/util/FieldUtils.java +++ b/src/main/java/com/alibaba/excel/util/FieldUtils.java @@ -41,15 +41,15 @@ public class FieldUtils { /** * Parsing the name matching cglib。 - * + *
+     *     null -> null
+     *     string1 -> string1
+     *     String2 -> string2
+     *     sTring3 -> STring3
+     *     STring4 -> STring4
+     *     STRING5 -> STRING5
+     *     STRing6 -> STRing6
+     * 
* * @param field field * @return field name. diff --git a/src/main/java/com/alibaba/excel/util/MapUtils.java b/src/main/java/com/alibaba/excel/util/MapUtils.java index 8e8a2778..8ad5145a 100644 --- a/src/main/java/com/alibaba/excel/util/MapUtils.java +++ b/src/main/java/com/alibaba/excel/util/MapUtils.java @@ -17,9 +17,9 @@ public class MapUtils { /** * Creates a mutable, empty {@code HashMap} instance. * - *

Note: if mutability is not required, use {@link ImmutableMap#of()} instead. + *

Note: if mutability is not required, use ImmutableMap.of() instead. * - *

Note: if {@code K} is an {@code enum} type, use {@link #newEnumMap} instead. + *

Note: if {@code K} is an {@code enum} type, use newEnumMap instead. * *

Note for Java 7 and later: this method is now unnecessary and should be treated as * deprecated. Instead, use the {@code HashMap} constructor directly, taking advantage of the new @@ -35,7 +35,7 @@ public class MapUtils { * Creates a mutable, empty {@code TreeMap} instance using the natural ordering of its * elements. * - *

Note: if mutability is not required, use {@link ImmutableSortedMap#of()} instead. + *

Note: if mutability is not required, use ImmutableSortedMap.of() instead. * *

Note for Java 7 and later: this method is now unnecessary and should be treated as * deprecated. Instead, use the {@code TreeMap} constructor directly, taking advantage of the new diff --git a/src/main/java/org/apache/poi/hssf/usermodel/PoiUtils.java b/src/main/java/org/apache/poi/hssf/usermodel/PoiUtils.java index 6708e63b..4f1d404f 100644 --- a/src/main/java/org/apache/poi/hssf/usermodel/PoiUtils.java +++ b/src/main/java/org/apache/poi/hssf/usermodel/PoiUtils.java @@ -20,7 +20,7 @@ public class PoiUtils { /** * Whether to customize the height * - * @param row + * @param row row * @return */ public static boolean customHeight(Row row) { diff --git a/src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java b/src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java index a08368e6..309e410f 100644 --- a/src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java +++ b/src/test/java/com/alibaba/easyexcel/test/demo/fill/FillTest.java @@ -72,6 +72,7 @@ public class FillTest { EasyExcel.write(fileName).withTemplate(templateFileName).sheet().doFill(data()); // 方案2 分多次 填充 会使用文件缓存(省内存) jdk8 + // since: 3.0.0-beta1 fileName = TestFileUtil.getPath() + "listFill" + System.currentTimeMillis() + ".xlsx"; EasyExcel.write(fileName) .withTemplate(templateFileName) diff --git a/src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java b/src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java index 11d149eb..faad0029 100644 --- a/src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java +++ b/src/test/java/com/alibaba/easyexcel/test/demo/read/ReadTest.java @@ -46,6 +46,7 @@ public class ReadTest { @Test public void simpleRead() { // 写法1:JDK8+ ,不用额外写一个ReadListener + // since: 3.0.0-beta1 String fileName = TestFileUtil.getPath() + "demo" + File.separator + "demo.xlsx"; // 这里 需要指定读用哪个class去读,然后读取第一个sheet 文件流会自动关闭 // 这里每次会读取3000条数据 然后返回过来 直接调用使用数据就行 diff --git a/src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java b/src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java index c2821dab..12c56cc0 100644 --- a/src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java +++ b/src/test/java/com/alibaba/easyexcel/test/demo/write/WriteTest.java @@ -60,6 +60,7 @@ public class WriteTest { @Test public void simpleWrite() { // 写法1 JDK8+ + // since: 3.0.0-beta1 String fileName = TestFileUtil.getPath() + "simpleWrite" + System.currentTimeMillis() + ".xlsx"; // 这里 需要指定写用哪个class去写,然后写到第一个sheet,名字为模板 然后文件流会自动关闭 // 如果这里想使用03 则 传入excelType参数即可