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


Java POIUtils.writeExcelFile方法代码示例

本文整理汇总了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);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:25,代码来源:ExportToExcelManager.java

示例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);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:21,代码来源:ExportToExcelManager.java

示例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);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:26,代码来源:ExportToExcelManager.java

示例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);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:23,代码来源:ExportToExcelManager.java

示例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);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:13,代码来源:DBUnitXLSTestDataCreator.java

示例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);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:11,代码来源:DBUnitXLSTestDataCreator.java


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