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


Java POIUtils.getCellValue方法代码示例

本文整理汇总了Java中org.insightech.er.util.POIUtils.getCellValue方法的典型用法代码示例。如果您正苦于以下问题:Java POIUtils.getCellValue方法的具体用法?Java POIUtils.getCellValue怎么用?Java POIUtils.getCellValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.insightech.er.util.POIUtils的用法示例。


在下文中一共展示了POIUtils.getCellValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setImage

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
public void setImage(final HSSFWorkbook workbook, final HSSFSheet sheet) {
    final CellLocation cellLocation = POIUtils.findMatchCell(sheet, "\\" + KEYWORD_ER + ".*");

    if (cellLocation != null) {
        int width = -1;
        int height = -1;

        final String value = POIUtils.getCellValue(sheet, cellLocation);

        final int startIndex = value.indexOf("(");
        if (startIndex != -1) {
            final int middleIndex = value.indexOf(",", startIndex + 1);
            if (middleIndex != -1) {
                width = Integer.parseInt(value.substring(startIndex + 1, middleIndex).trim());
                height = Integer.parseInt(value.substring(middleIndex + 1, value.length() - 1).trim());
            }
        }

        this.setImage(workbook, sheet, cellLocation, width, height);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:22,代码来源:PictureSheetGenerator.java

示例2: setImage

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
public void setImage(HSSFWorkbook workbook, HSSFSheet sheet) {
	CellLocation cellLocation = POIUtils.findMatchCell(sheet, "\\"
			+ KEYWORD_ER + ".*");

	if (cellLocation != null) {
		int width = -1;
		int height = -1;

		String value = POIUtils.getCellValue(sheet, cellLocation);

		int startIndex = value.indexOf("(");
		if (startIndex != -1) {
			int middleIndex = value.indexOf(",", startIndex + 1);
			if (middleIndex != -1) {
				width = Integer.parseInt(value.substring(startIndex + 1,
						middleIndex).trim());
				height = Integer.parseInt(value.substring(middleIndex + 1,
						value.length() - 1).trim());
			}
		}

		this.setImage(workbook, sheet, cellLocation, width, height);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:25,代码来源:PictureSheetGenerator.java

示例3: initLoopDefinitionMap

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
private void initLoopDefinitionMap(final HSSFSheet loopsSheet) {
    for (int i = 2; i <= loopsSheet.getLastRowNum(); i++) {
        final String templateSheetName = POIUtils.getCellValue(loopsSheet, i, 0);
        if (templateSheetName == null) {
            break;
        }

        final int firstLine = POIUtils.getIntCellValue(loopsSheet, i, 1);
        final int spaceLine = POIUtils.getIntCellValue(loopsSheet, i, 2);
        final String sheetName = POIUtils.getCellValue(loopsSheet, i, 3);

        loopDefinitionMap.put(templateSheetName, new LoopDefinition(firstLine, spaceLine, sheetName));
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:15,代码来源:ExportToExcelManager.java

示例4: initLoopDefinitionMap

import org.insightech.er.util.POIUtils; //导入方法依赖的package包/类
private void initLoopDefinitionMap(HSSFSheet loopsSheet) {
	for (int i = 2; i <= loopsSheet.getLastRowNum(); i++) {
		String templateSheetName = POIUtils.getCellValue(loopsSheet, i, 0);
		if (templateSheetName == null) {
			break;
		}

		int firstLine = POIUtils.getIntCellValue(loopsSheet, i, 1);
		int spaceLine = POIUtils.getIntCellValue(loopsSheet, i, 2);
		String sheetName = POIUtils.getCellValue(loopsSheet, i, 3);

		this.loopDefinitionMap.put(templateSheetName, new LoopDefinition(
				firstLine, spaceLine, sheetName));
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:16,代码来源:ExportToExcelManager.java


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