add method

This commit is contained in:
Looly 2022-03-24 22:22:53 +08:00
parent 98e46d7634
commit 9d5d55bf6a
2 changed files with 9 additions and 8 deletions

View File

@ -55,6 +55,7 @@ public class ExcelReader extends ExcelBase<ExcelReader> {
* *
* @param excelFilePath Excel文件路径绝对路径或相对于ClassPath路径 * @param excelFilePath Excel文件路径绝对路径或相对于ClassPath路径
* @param sheetName sheet名第一个默认是sheet1 * @param sheetName sheet名第一个默认是sheet1
* @since 5.8.0
*/ */
public ExcelReader(String excelFilePath, String sheetName) { public ExcelReader(String excelFilePath, String sheetName) {
this(FileUtil.file(excelFilePath), sheetName); this(FileUtil.file(excelFilePath), sheetName);

View File

@ -74,9 +74,9 @@ public class ExcelUtil {
/** /**
* 通过Sax方式读取Excel同时支持03和07格式 * 通过Sax方式读取Excel同时支持03和07格式
* *
* @param file Excel文件 * @param file Excel文件
* @param idOrRidOrSheetName Excel中的sheet id或rid编号或sheet名称rid必须加rId前缀例如rId1如果为-1处理所有编号的sheet * @param idOrRidOrSheetName Excel中的sheet id或rid编号或sheet名称rid必须加rId前缀例如rId1如果为-1处理所有编号的sheet
* @param rowHandler 行处理器 * @param rowHandler 行处理器
* @since 5.4.4 * @since 5.4.4
*/ */
public static void readBySax(File file, String idOrRidOrSheetName, RowHandler rowHandler) { public static void readBySax(File file, String idOrRidOrSheetName, RowHandler rowHandler) {
@ -101,9 +101,9 @@ public class ExcelUtil {
/** /**
* 通过Sax方式读取Excel同时支持03和07格式 * 通过Sax方式读取Excel同时支持03和07格式
* *
* @param in Excel流 * @param in Excel流
* @param idOrRidOrSheetName Excel中的sheet id或rid编号或sheet名称rid必须加rId前缀例如rId1如果为-1处理所有编号的sheet * @param idOrRidOrSheetName Excel中的sheet id或rid编号或sheet名称rid必须加rId前缀例如rId1如果为-1处理所有编号的sheet
* @param rowHandler 行处理器 * @param rowHandler 行处理器
* @since 5.4.4 * @since 5.4.4
*/ */
public static void readBySax(InputStream in, String idOrRidOrSheetName, RowHandler rowHandler) { public static void readBySax(InputStream in, String idOrRidOrSheetName, RowHandler rowHandler) {
@ -158,9 +158,9 @@ public class ExcelUtil {
* 获取Excel读取器通过调用{@link ExcelReader}的read或readXXX方法读取Excel内容 * 获取Excel读取器通过调用{@link ExcelReader}的read或readXXX方法读取Excel内容
* *
* @param bookFilePath Excel文件路径绝对路径或相对于ClassPath路径 * @param bookFilePath Excel文件路径绝对路径或相对于ClassPath路径
* @param sheetName sheet名第一个默认是sheet1 * @param sheetName sheet名第一个默认是sheet1
* @return {@link ExcelReader} * @return {@link ExcelReader}
* @since 3.1.1 * @since 5.8.0
*/ */
public static ExcelReader getReader(String bookFilePath, String sheetName) { public static ExcelReader getReader(String bookFilePath, String sheetName) {
try { try {