当前位置: 首页>>代码示例>>Java>>正文


Java HSSFRequest类代码示例

本文整理汇总了Java中org.apache.poi.hssf.eventusermodel.HSSFRequest的典型用法代码示例。如果您正苦于以下问题:Java HSSFRequest类的具体用法?Java HSSFRequest怎么用?Java HSSFRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


HSSFRequest类属于org.apache.poi.hssf.eventusermodel包,在下文中一共展示了HSSFRequest类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import org.apache.poi.hssf.eventusermodel.HSSFRequest; //导入依赖的package包/类
public void execute(InputStream inputStream, IParseExcelRowMapper parseExcelRowMapper) throws IOException {
	this.fs = new POIFSFileSystem(inputStream);
	this.minColumns = -1;
	this.parseExcelRowMapper = parseExcelRowMapper;
	MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(this);
	formatListener = new FormatTrackingHSSFListener(listener);
	HSSFEventFactory factory = new HSSFEventFactory();
	HSSFRequest request = new HSSFRequest();
	if (outputFormulaValues) {
		request.addListenerForAllRecords(formatListener);
	} else {
		workbookBuildingListener = new SheetRecordCollectingListener(formatListener);
		request.addListenerForAllRecords(workbookBuildingListener);
	}
	factory.processWorkbookEvents(request, fs);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:17,代码来源:HSSFParser.java

示例2: process

import org.apache.poi.hssf.eventusermodel.HSSFRequest; //导入依赖的package包/类
/**
 * Initiates the processing of the XLS file to CSV
 */
public List<String> process() throws IOException {
    MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(this);
    formatListener = new FormatTrackingHSSFListener(listener);

    HSSFEventFactory factory = new HSSFEventFactory();
    HSSFRequest request = new HSSFRequest();

    if (outputFormulaValues) {
        request.addListenerForAllRecords(formatListener);
    } else {
        workbookBuildingListener = new SheetRecordCollectingListener(formatListener);
        request.addListenerForAllRecords(workbookBuildingListener);
    }

    factory.processWorkbookEvents(request, fs);

    return results;
}
 
开发者ID:warlock-china,项目名称:azeroth,代码行数:22,代码来源:XLS2CSV.java

示例3: process

import org.apache.poi.hssf.eventusermodel.HSSFRequest; //导入依赖的package包/类
/**
 * Initiates the processing of the XLS file to CSV
 * @throws java.io.IOException from upstream
 */
public void process() throws IOException {
    final MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(this);
    formatListener = new FormatTrackingHSSFListener(listener);

    final HSSFEventFactory factory = new HSSFEventFactory();
    final HSSFRequest request = new HSSFRequest();

    if (outputFormulaValues) {
        request.addListenerForAllRecords(formatListener);
    } else {
        workbookBuildingListener = new SheetRecordCollectingListener(formatListener);
        request.addListenerForAllRecords(workbookBuildingListener);
    }

    factory.processWorkbookEvents(request, fs);
}
 
开发者ID:TFyre,项目名称:vaadin-gridexport,代码行数:21,代码来源:XLS2CSVmra.java

示例4: process

import org.apache.poi.hssf.eventusermodel.HSSFRequest; //导入依赖的package包/类
/**
 * Initiates the processing of the XLS file to CSV
 */
public List<String> process() throws IOException {
	MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(this);
	formatListener = new FormatTrackingHSSFListener(listener);

	HSSFEventFactory factory = new HSSFEventFactory();
	HSSFRequest request = new HSSFRequest();

	if(outputFormulaValues) {
		request.addListenerForAllRecords(formatListener);
	} else {
		workbookBuildingListener = new SheetRecordCollectingListener(formatListener);
		request.addListenerForAllRecords(workbookBuildingListener);
	}

	factory.processWorkbookEvents(request, fs);
	
	return results;
}
 
开发者ID:vakinge,项目名称:jeesuite-libs,代码行数:22,代码来源:XLS2CSV.java

示例5: process

import org.apache.poi.hssf.eventusermodel.HSSFRequest; //导入依赖的package包/类
/** 
  * 遍历 excel 文件 
 */
public void process() throws IOException {
    MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(this);
    formatListener = new FormatTrackingHSSFListener(listener);

    HSSFEventFactory factory = new HSSFEventFactory();
    HSSFRequest request = new HSSFRequest();

    if (outputFormulaValues) {
        request.addListenerForAllRecords(formatListener);
    } else {
        workbookBuildingListener = new SheetRecordCollectingListener(formatListener);
        request.addListenerForAllRecords(workbookBuildingListener);
    }

    factory.processWorkbookEvents(request, fs);
}
 
开发者ID:wufeisoft,项目名称:data,代码行数:20,代码来源:MyHSSFListener.java

示例6: process

import org.apache.poi.hssf.eventusermodel.HSSFRequest; //导入依赖的package包/类
/**
 * 遍历 excel 文件
 */
protected void process() throws IOException {
	MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(
			this);
	formatListener = new ExcelFormatTrackingHSSFListener(listener);
	formatListener.ignoreNumFormat(ignoreNumFormat);
	HSSFEventFactory factory = new HSSFEventFactory();
	HSSFRequest request = new HSSFRequest();

	if (outputFormulaValues) {
		request.addListenerForAllRecords(formatListener);
	} else {
		workbookBuildingListener = new SheetRecordCollectingListener(
				formatListener);
		request.addListenerForAllRecords(workbookBuildingListener);
	}

	factory.processWorkbookEvents(request, fs);
	
	
}
 
开发者ID:bingyulei007,项目名称:bingexcel,代码行数:24,代码来源:HSSFListenerAbstract.java

示例7: process

import org.apache.poi.hssf.eventusermodel.HSSFRequest; //导入依赖的package包/类
/**
 * 遍历 excel 文件
 */
public void process() throws IOException {
	MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(
			this);
	formatListener = new FormatTrackingHSSFListener(listener);

	HSSFEventFactory factory = new HSSFEventFactory();
	HSSFRequest request = new HSSFRequest();

	if (outputFormulaValues) {
		request.addListenerForAllRecords(formatListener);
	} else {
		workbookBuildingListener = new SheetRecordCollectingListener(
				formatListener);
		request.addListenerForAllRecords(workbookBuildingListener);
	}

	factory.processWorkbookEvents(request, fs);
}
 
开发者ID:RayleighChen,项目名称:Improve,代码行数:22,代码来源:HxlsAbstract.java

示例8: processarArquivoIO

import org.apache.poi.hssf.eventusermodel.HSSFRequest; //导入依赖的package包/类
/**
 * L� arquivo enviado e gera mensagens JMS.
 * 
 * Instancia request e starta leitura do arquivo com esta inst�ncia (this) de
 * objeto como listener
 * 
 * @param inputStream
 * @throws IOException
 * 
 */
protected void processarArquivoIO(InputStream inputStream) throws IOException {
	POIFSFileSystem poifs = new POIFSFileSystem(inputStream);
	InputStream din = poifs.createDocumentInputStream("Workbook");
	try {


		HSSFRequest req = new HSSFRequest();
		req.addListenerForAllRecords(this);

		HSSFEventFactory factory = new HSSFEventFactory();
		factory.processEvents(req, din);

	}catch(Throwable t){
		log.fatal("Erro fatal ao tentar executar o Processamento das mensagens!",t);
		t.printStackTrace();
		
	}
	finally {
		inputStream.close();
		din.close();
	}
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:33,代码来源:LeitorXLSCliente.java

示例9: process

import org.apache.poi.hssf.eventusermodel.HSSFRequest; //导入依赖的package包/类
/**
 * Initiates the processing of the XLS file to CSV
 */
public void process() throws IOException {
    MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(this);
    formatListener = new FormatTrackingHSSFListener(listener);

    HSSFEventFactory factory = new HSSFEventFactory();
    HSSFRequest request = new HSSFRequest();

    if(outputFormulaValues) {
        request.addListenerForAllRecords(formatListener);
    } else {
        workbookBuildingListener = new SheetRecordCollectingListener(formatListener);
        request.addListenerForAllRecords(workbookBuildingListener);
    }

    factory.processWorkbookEvents(request, fs);
}
 
开发者ID:nagirrab,项目名称:xls2csv,代码行数:20,代码来源:XlsToCsv.java

示例10: process

import org.apache.poi.hssf.eventusermodel.HSSFRequest; //导入依赖的package包/类
public void process(InputStream stream) throws IOException {
	this.fs = new POIFSFileSystem(stream);
	MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(this);
	formatListener = new FormatTrackingHSSFListener(listener);
	HSSFEventFactory factory = new HSSFEventFactory();
	HSSFRequest request = new HSSFRequest();
	if (outputFormulaValues) {
		request.addListenerForAllRecords(formatListener);
	} else {
		workbookBuildingListener = new SheetRecordCollectingListener(formatListener);
		request.addListenerForAllRecords(workbookBuildingListener);
	}
	factory.processWorkbookEvents(request, fs);
}
 
开发者ID:iBase4J,项目名称:iBase4J-Common,代码行数:15,代码来源:Excel2003Reader.java

示例11: processFile

import org.apache.poi.hssf.eventusermodel.HSSFRequest; //导入依赖的package包/类
private void processFile() {
    HSSFRequest req = new HSSFRequest();
    for(short rId : getInterestingReqordIds())
        req.addListener(this, rId);
    HSSFEventFactory factory = new HSSFEventFactory();
    factory.processEvents(req, din);
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:8,代码来源:XlsReader.java


注:本文中的org.apache.poi.hssf.eventusermodel.HSSFRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。