Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_879456671
easyexcel
提交
50ff4db8
E
easyexcel
项目概览
qq_879456671
/
easyexcel
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
easyexcel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
50ff4db8
编写于
9月 15, 2021
作者:
庄家钜
提交者:
GitHub
9月 15, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1974 from lethal233/comment_typo_fix
fix typo in comments
上级
aaf45049
4af4ea8b
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
37 addition
and
37 deletion
+37
-37
src/main/java/com/alibaba/excel/annotation/ExcelProperty.java
...main/java/com/alibaba/excel/annotation/ExcelProperty.java
+1
-1
src/main/java/com/alibaba/excel/annotation/write/style/ContentFontStyle.java
...libaba/excel/annotation/write/style/ContentFontStyle.java
+1
-1
src/main/java/com/alibaba/excel/annotation/write/style/HeadFontStyle.java
...m/alibaba/excel/annotation/write/style/HeadFontStyle.java
+1
-1
src/main/java/com/alibaba/excel/metadata/CellExtra.java
src/main/java/com/alibaba/excel/metadata/CellExtra.java
+4
-4
src/main/java/com/alibaba/excel/metadata/property/FontProperty.java
...ava/com/alibaba/excel/metadata/property/FontProperty.java
+1
-1
src/main/java/com/alibaba/excel/read/builder/ExcelReaderBuilder.java
...va/com/alibaba/excel/read/builder/ExcelReaderBuilder.java
+4
-4
src/main/java/com/alibaba/excel/read/metadata/ReadWorkbook.java
...in/java/com/alibaba/excel/read/metadata/ReadWorkbook.java
+3
-3
src/main/java/com/alibaba/excel/read/metadata/holder/ReadWorkbookHolder.java
...libaba/excel/read/metadata/holder/ReadWorkbookHolder.java
+3
-3
src/main/java/com/alibaba/excel/write/builder/ExcelWriterBuilder.java
...a/com/alibaba/excel/write/builder/ExcelWriterBuilder.java
+1
-1
src/main/java/com/alibaba/excel/write/executor/AbstractExcelWriteExecutor.java
...baba/excel/write/executor/AbstractExcelWriteExecutor.java
+2
-2
src/main/java/com/alibaba/excel/write/executor/ExcelWriteAddExecutor.java
...m/alibaba/excel/write/executor/ExcelWriteAddExecutor.java
+1
-1
src/main/java/com/alibaba/excel/write/metadata/WriteWorkbook.java
.../java/com/alibaba/excel/write/metadata/WriteWorkbook.java
+5
-5
src/main/java/com/alibaba/excel/write/metadata/holder/WriteSheetHolder.java
...alibaba/excel/write/metadata/holder/WriteSheetHolder.java
+2
-2
src/main/java/com/alibaba/excel/write/metadata/holder/WriteWorkbookHolder.java
...baba/excel/write/metadata/holder/WriteWorkbookHolder.java
+4
-4
src/main/java/com/alibaba/excel/write/metadata/style/WriteFont.java
...ava/com/alibaba/excel/write/metadata/style/WriteFont.java
+1
-1
src/main/java/com/alibaba/excel/write/style/column/AbstractHeadColumnWidthStyleStrategy.java
...te/style/column/AbstractHeadColumnWidthStyleStrategy.java
+1
-1
src/test/java/com/alibaba/easyexcel/test/core/compatibility/CompatibilityDataTest.java
...yexcel/test/core/compatibility/CompatibilityDataTest.java
+2
-2
未找到文件。
src/main/java/com/alibaba/excel/annotation/ExcelProperty.java
浏览文件 @
50ff4db8
...
...
@@ -32,7 +32,7 @@ public @interface ExcelProperty {
/**
* Index of column
*
* Read or write it on the index of column,If it's equal to -1, it's sorted by Java class.
* Read or write it on the index of column,
If it's equal to -1, it's sorted by Java class.
*
* priority: index > order > default sort
*
...
...
src/main/java/com/alibaba/excel/annotation/write/style/ContentFontStyle.java
浏览文件 @
50ff4db8
...
...
@@ -52,7 +52,7 @@ public @interface ContentFontStyle {
short
color
()
default
-
1
;
/**
* Set normal,super or subscript.
* Set normal,
super or subscript.
*
* @see Font#SS_NONE
* @see Font#SS_SUPER
...
...
src/main/java/com/alibaba/excel/annotation/write/style/HeadFontStyle.java
浏览文件 @
50ff4db8
...
...
@@ -52,7 +52,7 @@ public @interface HeadFontStyle {
short
color
()
default
-
1
;
/**
* Set normal,super or subscript.
* Set normal,
super or subscript.
*
* @see Font#SS_NONE
* @see Font#SS_SUPER
...
...
src/main/java/com/alibaba/excel/metadata/CellExtra.java
浏览文件 @
50ff4db8
...
...
@@ -20,19 +20,19 @@ public class CellExtra extends AbstractCell {
*/
private
String
text
;
/**
* First row index,if this object is an interval
* First row index,
if this object is an interval
*/
private
Integer
firstRowIndex
;
/**
* Last row index,if this object is an interval
* Last row index,
if this object is an interval
*/
private
Integer
lastRowIndex
;
/**
* First column index,if this object is an interval
* First column index,
if this object is an interval
*/
private
Integer
firstColumnIndex
;
/**
* Last column index,if this object is an interval
* Last column index,
if this object is an interval
*/
private
Integer
lastColumnIndex
;
...
...
src/main/java/com/alibaba/excel/metadata/property/FontProperty.java
浏览文件 @
50ff4db8
...
...
@@ -40,7 +40,7 @@ public class FontProperty {
*/
private
Short
color
;
/**
* Set normal,super or subscript.
* Set normal,
super or subscript.
*
* @see Font#SS_NONE
* @see Font#SS_SUPER
...
...
src/main/java/com/alibaba/excel/read/builder/ExcelReaderBuilder.java
浏览文件 @
50ff4db8
...
...
@@ -41,7 +41,7 @@ public class ExcelReaderBuilder extends AbstractExcelReaderParameterBuilder<Exce
/**
* Read InputStream
* <p>
* If 'inputStream' and 'file' all not empty,file first
* If 'inputStream' and 'file' all not empty,
file first
*/
public
ExcelReaderBuilder
file
(
InputStream
inputStream
)
{
readWorkbook
.
setInputStream
(
inputStream
);
...
...
@@ -51,7 +51,7 @@ public class ExcelReaderBuilder extends AbstractExcelReaderParameterBuilder<Exce
/**
* Read file
* <p>
* If 'inputStream' and 'file' all not empty,file first
* If 'inputStream' and 'file' all not empty,
file first
*/
public
ExcelReaderBuilder
file
(
File
file
)
{
readWorkbook
.
setFile
(
file
);
...
...
@@ -61,7 +61,7 @@ public class ExcelReaderBuilder extends AbstractExcelReaderParameterBuilder<Exce
/**
* Read file
* <p>
* If 'inputStream' and 'file' all not empty,file first
* If 'inputStream' and 'file' all not empty,
file first
*/
public
ExcelReaderBuilder
file
(
String
pathName
)
{
return
file
(
new
File
(
pathName
));
...
...
@@ -70,7 +70,7 @@ public class ExcelReaderBuilder extends AbstractExcelReaderParameterBuilder<Exce
/**
* Mandatory use 'inputStream' .Default is false.
* <p>
* if false,Will transfer 'inputStream' to temporary files to improve efficiency
* if false,
Will transfer 'inputStream' to temporary files to improve efficiency
*/
public
ExcelReaderBuilder
mandatoryUseInputStream
(
Boolean
mandatoryUseInputStream
)
{
readWorkbook
.
setMandatoryUseInputStream
(
mandatoryUseInputStream
);
...
...
src/main/java/com/alibaba/excel/read/metadata/ReadWorkbook.java
浏览文件 @
50ff4db8
...
...
@@ -27,19 +27,19 @@ public class ReadWorkbook extends ReadBasicParameter {
/**
* Read InputStream
* <p>
* If 'inputStream' and 'file' all not empty,file first
* If 'inputStream' and 'file' all not empty,
file first
*/
private
InputStream
inputStream
;
/**
* Read file
* <p>
* If 'inputStream' and 'file' all not empty,file first
* If 'inputStream' and 'file' all not empty,
file first
*/
private
File
file
;
/**
* Mandatory use 'inputStream' .Default is false.
* <p>
* if false,Will transfer 'inputStream' to temporary files to improve efficiency
* if false,
Will transfer 'inputStream' to temporary files to improve efficiency
*/
private
Boolean
mandatoryUseInputStream
;
/**
...
...
src/main/java/com/alibaba/excel/read/metadata/holder/ReadWorkbookHolder.java
浏览文件 @
50ff4db8
...
...
@@ -33,19 +33,19 @@ public class ReadWorkbookHolder extends AbstractReadHolder {
/**
* Read InputStream
* <p>
* If 'inputStream' and 'file' all not empty,file first
* If 'inputStream' and 'file' all not empty,
file first
*/
private
InputStream
inputStream
;
/**
* Read file
* <p>
* If 'inputStream' and 'file' all not empty,file first
* If 'inputStream' and 'file' all not empty,
file first
*/
private
File
file
;
/**
* Mandatory use 'inputStream' .Default is false.
* <p>
* if false,Will transfer 'inputStream' to temporary files to improve efficiency
* if false,
Will transfer 'inputStream' to temporary files to improve efficiency
*/
private
Boolean
mandatoryUseInputStream
;
/**
...
...
src/main/java/com/alibaba/excel/write/builder/ExcelWriterBuilder.java
浏览文件 @
50ff4db8
...
...
@@ -49,7 +49,7 @@ public class ExcelWriterBuilder extends AbstractExcelWriterParameterBuilder<Exce
}
/**
* Write excel in memory. Default false,the cache file is created and finally written to excel.
* Write excel in memory. Default false,
the cache file is created and finally written to excel.
* <p>
* Comment and RichTextString are only supported in memory mode.
*/
...
...
src/main/java/com/alibaba/excel/write/executor/AbstractExcelWriteExecutor.java
浏览文件 @
50ff4db8
...
...
@@ -117,12 +117,12 @@ public abstract class AbstractExcelWriteExecutor implements ExcelWriteExecutor {
}
catch
(
Exception
e
)
{
throw
new
ExcelDataConvertException
(
cell
.
getRow
().
getRowNum
(),
cell
.
getColumnIndex
(),
new
CellData
(
CellDataTypeEnum
.
EMPTY
),
excelContentProperty
,
"Convert data:"
+
value
+
" error,at row:"
+
cell
.
getRow
().
getRowNum
(),
e
);
"Convert data:"
+
value
+
" error,
at row:"
+
cell
.
getRow
().
getRowNum
(),
e
);
}
if
(
cellData
==
null
||
cellData
.
getType
()
==
null
)
{
throw
new
ExcelDataConvertException
(
cell
.
getRow
().
getRowNum
(),
cell
.
getColumnIndex
(),
new
CellData
(
CellDataTypeEnum
.
EMPTY
),
excelContentProperty
,
"Convert data:"
+
value
+
" return null,at row:"
+
cell
.
getRow
().
getRowNum
());
"Convert data:"
+
value
+
" return null,
at row:"
+
cell
.
getRow
().
getRowNum
());
}
return
cellData
;
}
...
...
src/main/java/com/alibaba/excel/write/executor/ExcelWriteAddExecutor.java
浏览文件 @
50ff4db8
...
...
@@ -48,7 +48,7 @@ public class ExcelWriteAddExecutor extends AbstractExcelWriteExecutor {
if
(
writeSheetHolder
.
isNew
()
&&
!
writeSheetHolder
.
getExcelWriteHeadProperty
().
hasHead
())
{
newRowIndex
+=
writeContext
.
currentWriteHolder
().
relativeHeadRowIndex
();
}
// BeanMap is out of order,so use sortedAllFiledMap
// BeanMap is out of order,
so use sortedAllFiledMap
Map
<
Integer
,
Field
>
sortedAllFiledMap
=
new
TreeMap
<
Integer
,
Field
>();
int
relativeRowIndex
=
0
;
for
(
Object
oneRowData
:
data
)
{
...
...
src/main/java/com/alibaba/excel/write/metadata/WriteWorkbook.java
浏览文件 @
50ff4db8
...
...
@@ -20,26 +20,26 @@ public class WriteWorkbook extends WriteBasicParameter {
/**
* Final output file
* <p>
* If 'outputStream' and 'file' all not empty,file first
* If 'outputStream' and 'file' all not empty,
file first
*/
private
File
file
;
/**
* Final output stream
* <p>
* If 'outputStream' and 'file' all not empty,file first
* If 'outputStream' and 'file' all not empty,
file first
*/
private
OutputStream
outputStream
;
/**
* Template input stream
* <p>
* If 'inputStream' and 'file' all not empty,file first
* If 'inputStream' and 'file' all not empty,
file first
*/
private
InputStream
templateInputStream
;
/**
* Template file
* <p>
* If 'inputStream' and 'file' all not empty,file first
* If 'inputStream' and 'file' all not empty,
file first
*/
private
File
templateFile
;
/**
...
...
@@ -58,7 +58,7 @@ public class WriteWorkbook extends WriteBasicParameter {
*/
private
String
password
;
/**
* Write excel in memory. Default false,the cache file is created and finally written to excel.
* Write excel in memory. Default false,
the cache file is created and finally written to excel.
* <p>
* Comment and RichTextString are only supported in memory mode.
*/
...
...
src/main/java/com/alibaba/excel/write/metadata/holder/WriteSheetHolder.java
浏览文件 @
50ff4db8
...
...
@@ -148,12 +148,12 @@ public class WriteSheetHolder extends AbstractWriteHolder {
}
/**
* Get the last line of index,you have to make sure that the data is written next
* Get the last line of index,
you have to make sure that the data is written next
*
* @return
*/
public
int
getNewRowIndexAndStartDoWrite
()
{
// 'getLastRowNum' doesn't matter if it has one or zero,
is
's zero
// 'getLastRowNum' doesn't matter if it has one or zero,
it
's zero
int
newRowIndex
=
0
;
switch
(
writeLastRowTypeEnum
)
{
case
TEMPLATE_EMPTY:
...
...
src/main/java/com/alibaba/excel/write/metadata/holder/WriteWorkbookHolder.java
浏览文件 @
50ff4db8
...
...
@@ -52,7 +52,7 @@ public class WriteWorkbookHolder extends AbstractWriteHolder {
/**
* Final output file
* <p>
* If 'outputStream' and 'file' all not empty,file first
* If 'outputStream' and 'file' all not empty,
file first
*/
private
File
file
;
/**
...
...
@@ -62,13 +62,13 @@ public class WriteWorkbookHolder extends AbstractWriteHolder {
/**
* Template input stream
* <p>
* If 'inputStream' and 'file' all not empty,file first
* If 'inputStream' and 'file' all not empty,
file first
*/
private
InputStream
templateInputStream
;
/**
* Template file
* <p>
* If 'inputStream' and 'file' all not empty,file first
* If 'inputStream' and 'file' all not empty,
file first
*/
private
File
templateFile
;
/**
...
...
@@ -102,7 +102,7 @@ public class WriteWorkbookHolder extends AbstractWriteHolder {
*/
private
String
password
;
/**
* Write excel in memory. Default false,the cache file is created and finally written to excel.
* Write excel in memory. Default false,
the cache file is created and finally written to excel.
* <p>
* Comment and RichTextString are only supported in memory mode.
*/
...
...
src/main/java/com/alibaba/excel/write/metadata/style/WriteFont.java
浏览文件 @
50ff4db8
...
...
@@ -37,7 +37,7 @@ public class WriteFont {
*/
private
Short
color
;
/**
* Set normal,super or subscript.
* Set normal,
super or subscript.
*
* @see Font#SS_NONE
* @see Font#SS_SUPER
...
...
src/main/java/com/alibaba/excel/write/style/column/AbstractHeadColumnWidthStyleStrategy.java
浏览文件 @
50ff4db8
...
...
@@ -33,7 +33,7 @@ public abstract class AbstractHeadColumnWidthStyleStrategy extends AbstractColum
* Returns the column width corresponding to each column head.
*
* <p>
* if return null,ignore
* if return null,
ignore
*
* @param head
* Nullable.
...
...
src/test/java/com/alibaba/easyexcel/test/core/compatibility/CompatibilityDataTest.java
浏览文件 @
50ff4db8
...
...
@@ -58,7 +58,7 @@ public class CompatibilityDataTest {
generateParam
.
setOutputStream
(
out
);
generateParam
.
setClazz
(
null
);
ExcelWriter
writer
=
new
ExcelWriter
(
generateParam
);
// sheet1 width,
string head,
string data
// sheet1 width,
string head,
string data
Sheet
sheet1
=
new
Sheet
(
1
,
3
);
sheet1
.
setSheetName
(
"第一个sheet"
);
Map
columnWidth
=
new
HashMap
();
...
...
@@ -68,7 +68,7 @@ public class CompatibilityDataTest {
sheet1
.
setHead
(
head
());
writer
.
write1
(
listData
(),
sheet1
);
// sheet2 style,class head
// sheet2 style,
class head
Sheet
sheet2
=
new
Sheet
(
2
,
3
,
CompatibilityData
.
class
,
"第二个sheet"
,
null
);
sheet2
.
setStartRow
(
5
);
sheet2
.
setTableStyle
(
style
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录