org.jeecgframework.poi.excel.imports.sax.parse.ISaxRowRead Java Examples

The following examples show how to use org.jeecgframework.poi.excel.imports.sax.parse.ISaxRowRead. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SaxReadExcel.java    From autopoi with Apache License 2.0 5 votes vote down vote up
public <T> List<T> readExcel(InputStream inputstream, Class<?> pojoClass, ImportParams params, ISaxRowRead rowRead, IExcelReadRowHanlder hanlder) {
	try {
		OPCPackage opcPackage = OPCPackage.open(inputstream);
		return readExcel(opcPackage, pojoClass, params, rowRead, hanlder);
	} catch (Exception e) {
		LOGGER.error(e.getMessage(), e);
		throw new ExcelImportException(e.getMessage());
	}
}
 
Example #2
Source File: SaxReadExcel.java    From jeasypoi with Apache License 2.0 5 votes vote down vote up
public <T> List<T> readExcel(InputStream inputstream, Class<?> pojoClass, ImportParams params, ISaxRowRead rowRead, IExcelReadRowHanlder hanlder) {
	try {
		OPCPackage opcPackage = OPCPackage.open(inputstream);
		return readExcel(opcPackage, pojoClass, params, rowRead, hanlder);
	} catch (Exception e) {
		LOGGER.error(e.getMessage(), e);
		throw new ExcelImportException(e.getMessage());
	}
}
 
Example #3
Source File: SaxReadExcel.java    From easypoi with Apache License 2.0 5 votes vote down vote up
public <T> List<T> readExcel(InputStream inputstream, Class<?> pojoClass, ImportParams params,
                             ISaxRowRead rowRead, IExcelReadRowHanlder hanlder) {
    try {
        OPCPackage opcPackage = OPCPackage.open(inputstream);
        return readExcel(opcPackage, pojoClass, params, rowRead, hanlder);
    } catch (Exception e) {
        LOGGER.error(e.getMessage(), e);
        throw new ExcelImportException(e.getMessage());
    }
}
 
Example #4
Source File: SaxReadExcel.java    From easypoi with Apache License 2.0 5 votes vote down vote up
private XMLReader fetchSheetParser(SharedStringsTable sst, ISaxRowRead rowRead)
                                                                               throws SAXException {
    XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
    ContentHandler handler = new SheetHandler(sst, rowRead);
    parser.setContentHandler(handler);
    return parser;
}
 
Example #5
Source File: SaxReadExcel.java    From autopoi with Apache License 2.0 4 votes vote down vote up
private XMLReader fetchSheetParser(SharedStringsTable sst, ISaxRowRead rowRead) throws SAXException {
	XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
	ContentHandler handler = new SheetHandler(sst, rowRead);
	parser.setContentHandler(handler);
	return parser;
}
 
Example #6
Source File: SheetHandler.java    From autopoi with Apache License 2.0 4 votes vote down vote up
public SheetHandler(SharedStringsTable sst, ISaxRowRead rowRead) {
	this.sst = sst;
	this.read = rowRead;
}
 
Example #7
Source File: SaxReadExcel.java    From jeasypoi with Apache License 2.0 4 votes vote down vote up
private XMLReader fetchSheetParser(SharedStringsTable sst, ISaxRowRead rowRead) throws SAXException {
	XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
	ContentHandler handler = new SheetHandler(sst, rowRead);
	parser.setContentHandler(handler);
	return parser;
}
 
Example #8
Source File: SheetHandler.java    From jeasypoi with Apache License 2.0 4 votes vote down vote up
public SheetHandler(SharedStringsTable sst, ISaxRowRead rowRead) {
	this.sst = sst;
	this.read = rowRead;
}
 
Example #9
Source File: SheetHandler.java    From easypoi with Apache License 2.0 4 votes vote down vote up
public SheetHandler(SharedStringsTable sst, ISaxRowRead rowRead) {
    this.sst = sst;
    this.read = rowRead;
}
 
Example #10
Source File: ExcelImportUtil.java    From autopoi with Apache License 2.0 2 votes vote down vote up
/**
 * Excel 通过SAX解析方法,适合大数据导入,不支持图片 导入 数据源IO流,不返回校验结果 导入 字段类型
 * Integer,Long,Double,Date,String,Boolean
 * 
 * @param file
 * @param rowRead
 * @return
 * @throws Exception
 */
public static <T> List<T> importExcelBySax(InputStream inputstream, ISaxRowRead rowRead) {
	return new SaxReadExcel().readExcel(inputstream, null, null, rowRead, null);
}
 
Example #11
Source File: ExcelImportUtil.java    From jeasypoi with Apache License 2.0 2 votes vote down vote up
/**
 * Excel 通过SAX解析方法,适合大数据导入,不支持图片 导入 数据源IO流,不返回校验结果 导入 字段类型
 * Integer,Long,Double,Date,String,Boolean
 * 
 * @param file
 * @param rowRead
 * @return
 * @throws Exception
 */
public static <T> List<T> importExcelBySax(InputStream inputstream, ISaxRowRead rowRead) {
	return new SaxReadExcel().readExcel(inputstream, null, null, rowRead, null);
}
 
Example #12
Source File: ExcelImportUtil.java    From easypoi with Apache License 2.0 2 votes vote down vote up
/**
 * Excel 通过SAX解析方法,适合大数据导入,不支持图片
 * 导入 数据源IO流,不返回校验结果 导入 字段类型 Integer,Long,Double,Date,String,Boolean
 * 
 * @param file
 * @param rowRead
 * @return
 * @throws Exception
 */
public static <T> List<T> importExcelBySax(InputStream inputstream, ISaxRowRead rowRead) {
    return new SaxReadExcel().readExcel(inputstream, null, null, rowRead, null);
}