本文整理汇总了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);
}
}
示例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);
}
}
示例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));
}
}
示例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));
}
}