本文整理了Java中org.apache.poi.hssf.usermodel.HSSFWorkbook.getUniqueSheetName()
方法的一些代码示例,展示了HSSFWorkbook.getUniqueSheetName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFWorkbook.getUniqueSheetName()
方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFWorkbook
类名称:HSSFWorkbook
方法名:getUniqueSheetName
暂无
代码示例来源:origin: org.apache.poi/poi
clonedSheet.setActive(false);
String name = getUniqueSheetName(srcName);
int newSheetIndex = _sheets.size();
_sheets.add(clonedSheet);
代码示例来源:origin: com.haulmont.thirdparty/poi
clonedSheet.setActive(false);
String name = getUniqueSheetName(srcName);
int newSheetIndex = _sheets.size();
_sheets.add(clonedSheet);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
clonedSheet.setActive(false);
String name = getUniqueSheetName(srcName);
int newSheetIndex = _sheets.size();
_sheets.add(clonedSheet);
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* create an HSSFSheet from an existing sheet in the HSSFWorkbook.
*
* @return HSSFSheet representing the cloned sheet.
*/
public HSSFSheet cloneSheet(int sheetIndex) {
validateSheetIndex(sheetIndex);
HSSFSheet srcSheet = _sheets.get(sheetIndex);
String srcName = workbook.getSheetName(sheetIndex);
HSSFSheet clonedSheet = srcSheet.cloneSheet(this);
clonedSheet.setSelected(false);
clonedSheet.setActive(false);
String name = getUniqueSheetName(srcName);
int newSheetIndex = _sheets.size();
_sheets.add(clonedSheet);
workbook.setSheetName(newSheetIndex, name);
// Check this sheet has an autofilter, (which has a built-in NameRecord at workbook level)
int filterDbNameIndex = findExistingBuiltinNameRecordIdx(sheetIndex, NameRecord.BUILTIN_FILTER_DB);
if (filterDbNameIndex != -1) {
NameRecord newNameRecord = workbook.cloneFilter(filterDbNameIndex, newSheetIndex);
HSSFName newName = new HSSFName(this, newNameRecord);
names.add(newName);
}
// TODO - maybe same logic required for other/all built-in name records
workbook.cloneDrawings(clonedSheet.getSheet());
return clonedSheet;
}
内容来源于网络,如有侵权,请联系作者删除!