本文整理汇总了Java中org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener类的典型用法代码示例。如果您正苦于以下问题:Java MissingRecordAwareHSSFListener类的具体用法?Java MissingRecordAwareHSSFListener怎么用?Java MissingRecordAwareHSSFListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MissingRecordAwareHSSFListener类属于org.apache.poi.hssf.eventusermodel包,在下文中一共展示了MissingRecordAwareHSSFListener类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
import org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener; //导入依赖的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;
}
示例2: process
import org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener; //导入依赖的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);
}
示例3: execute
import org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener; //导入依赖的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);
}
示例4: process
import org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener; //导入依赖的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;
}
示例5: process
import org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener; //导入依赖的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);
}
示例6: process
import org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener; //导入依赖的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);
}
示例7: process
import org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener; //导入依赖的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);
}
示例8: process
import org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener; //导入依赖的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);
}
示例9: process
import org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener; //导入依赖的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);
}