|
|
|
@ -283,11 +283,23 @@ public class ExcelUtil<T>
|
|
|
|
|
* @return 转换后集合
|
|
|
|
|
*/
|
|
|
|
|
public List<T> importExcel(InputStream is)
|
|
|
|
|
{
|
|
|
|
|
return importExcel(is, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 对excel表单默认第一个索引名转换成list
|
|
|
|
|
*
|
|
|
|
|
* @param is 输入流
|
|
|
|
|
* @param titleNum 标题占用行数
|
|
|
|
|
* @return 转换后集合
|
|
|
|
|
*/
|
|
|
|
|
public List<T> importExcel(InputStream is, int titleNum)
|
|
|
|
|
{
|
|
|
|
|
List<T> list = null;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
list = importExcel(is, 0);
|
|
|
|
|
list = importExcel(StringUtils.EMPTY, is, titleNum);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
@ -301,18 +313,6 @@ public class ExcelUtil<T>
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 对excel表单默认第一个索引名转换成list
|
|
|
|
|
*
|
|
|
|
|
* @param is 输入流
|
|
|
|
|
* @param titleNum 标题占用行数
|
|
|
|
|
* @return 转换后集合
|
|
|
|
|
*/
|
|
|
|
|
public List<T> importExcel(InputStream is, int titleNum) throws Exception
|
|
|
|
|
{
|
|
|
|
|
return importExcel(StringUtils.EMPTY, is, titleNum);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 对excel表单指定表格索引名转换成list
|
|
|
|
|
*
|
|
|
|
|