本文整理汇总了Java中org.insightech.er.util.POIUtils.writeExcelFile方法的典型用法代码示例。如果您正苦于以下问题:Java POIUtils.writeExcelFile方法的具体用法?Java POIUtils.writeExcelFile怎么用?Java POIUtils.writeExcelFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.insightech.er.util.POIUtils
的用法示例。
在下文中一共展示了POIUtils.writeExcelFile方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
@Override
public void init(final ERDiagram diagram, final File projectDir) throws Exception {
super.init(diagram, projectDir);
excelFile = FileUtils.getFile(this.projectDir, exportExcelSetting.getExcelOutput());
excelFile.getParentFile().mkdirs();
// this.backup(this.excelFile, true);
InputStream templateStream = null;
try {
templateStream = getSelectedTemplate();
workbook = loadTemplateWorkbook(templateStream, this.diagram);
} finally {
if (templateStream != null) {
templateStream.close();
}
}
// check whether the file is not opened by another process.
POIUtils.writeExcelFile(excelFile, workbook);
}
示例2: doProcess
import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
@Override
protected void doProcess(final ProgressMonitor monitor) throws Exception {
if (exportExcelSetting.isPutERDiagramOnExcel()) {
pictureSheetGenerator = createPictureSheetGenerator(monitor, workbook);
}
createSheetFromTemplate(monitor, workbook, diagram, exportExcelSetting.isUseLogicalNameAsSheet());
for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
workbook.getSheetAt(i).setSelected(false);
}
if (workbook.getNumberOfSheets() > 0) {
workbook.getSheetAt(0).setSelected(true);
workbook.setActiveSheet(0);
workbook.setFirstVisibleTab(0);
}
POIUtils.writeExcelFile(excelFile, workbook);
}
示例3: init
import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
@Override
public void init(ERDiagram diagram, File projectDir) throws Exception {
super.init(diagram, projectDir);
this.excelFile = FileUtils.getFile(this.projectDir,
this.exportExcelSetting.getExcelOutput());
this.excelFile.getParentFile().mkdirs();
// this.backup(this.excelFile, true);
InputStream templateStream = null;
try {
templateStream = this.getSelectedTemplate();
workbook = this.loadTemplateWorkbook(templateStream, this.diagram);
} finally {
if (templateStream != null) {
templateStream.close();
}
}
// check whether the file is not opened by another process.
POIUtils.writeExcelFile(excelFile, workbook);
}
示例4: doProcess
import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
@Override
protected void doProcess(ProgressMonitor monitor) throws Exception {
if (this.exportExcelSetting.isPutERDiagramOnExcel()) {
this.pictureSheetGenerator = this.createPictureSheetGenerator(
monitor, workbook);
}
this.createSheetFromTemplate(monitor, workbook, diagram,
this.exportExcelSetting.isUseLogicalNameAsSheet());
for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
workbook.getSheetAt(i).setSelected(false);
}
if (workbook.getNumberOfSheets() > 0) {
workbook.getSheetAt(0).setSelected(true);
workbook.setActiveSheet(0);
workbook.setFirstVisibleTab(0);
}
POIUtils.writeExcelFile(excelFile, workbook);
}
示例5: write
import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
@Override
protected void write() throws Exception {
super.write();
File file = new File(FileUtils.getFile(this.baseDir,
this.exportTestDataSetting.getExportFilePath()),
this.testData.getName() + ".xls");
file.getParentFile().mkdirs();
POIUtils.writeExcelFile(file, this.workbook);
}
示例6: write
import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
@Override
protected void write() throws Exception {
super.write();
final File file = new File(FileUtils.getFile(baseDir, exportTestDataSetting.getExportFilePath()), testData.getName() + ".xls");
file.getParentFile().mkdirs();
POIUtils.writeExcelFile(file, workbook);
}