com.github.rrsunhome.excelsql.parser.ExcelFileParser Maven / Gradle / Ivy
package com.github.rrsunhome.excelsql.parser;
import com.alibaba.excel.EasyExcel;
import com.github.rrsunhome.excelsql.config.ExcelParserConfig;
import com.github.rrsunhome.excelsql.config.BaseParserConfig;
import com.github.rrsunhome.excelsql.parser.support.BaseRowResultSet;
import com.github.rrsunhome.excelsql.parser.support.MapRowResultSet;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author : wangqijia
* create at: 2021/10/26 下午5:22
*/
public class ExcelFileParser extends AbstractFileParser {
@Override
public String[] getSupportedFileExtensions() {
return new String[]{"xls", "xlsx"};
}
@Override
public BaseParserConfig getDefaultParserConfig() {
return new ExcelParserConfig();
}
@Override
protected List load(InputStream is, BaseParserConfig parserConfig) {
ExcelParserConfig excelParserConfig = (ExcelParserConfig) parserConfig;
List