本文整理了Java中org.apache.poi.hssf.usermodel.HSSFWorkbook.getActiveSheetIndex()
方法的一些代码示例,展示了HSSFWorkbook.getActiveSheetIndex()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFWorkbook.getActiveSheetIndex()
方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFWorkbook
类名称:HSSFWorkbook
方法名:getActiveSheetIndex
[英]gets the tab whose data is actually seen when the sheet is opened. This may be different from the "selected sheet" since excel seems to allow you to show the data of one sheet when another is seen "selected" in the tabs (at the bottom).
[中]
代码示例来源:origin: org.apache.poi/poi
private void updateActiveSheetAfterSheetReorder(int oldIndex, int newIndex) {
// adjust active sheet if necessary
int active = getActiveSheetIndex();
if(active == oldIndex) {
// moved sheet was the active one
setActiveSheet(newIndex);
} else if ((active < oldIndex && active < newIndex) ||
(active > oldIndex && active > newIndex)) {
// not affected
} else if (newIndex > oldIndex) {
// moved sheet was below before and is above now => active is one less
setActiveSheet(active-1);
} else {
// remaining case: moved sheet was higher than active before and is lower now => active is one more
setActiveSheet(active+1);
}
}
代码示例来源:origin: org.apache.poi/poi
int active = getActiveSheetIndex();
if(active == index) {
代码示例来源:origin: com.haulmont.thirdparty/poi
/**
* deprecated May 2008
* @deprecated - Misleading name - use getActiveSheetIndex()
*/
public short getSelectedTab() {
return (short) getActiveSheetIndex();
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* deprecated May 2008
* @deprecated - Misleading name - use getActiveSheetIndex()
*/
public short getSelectedTab() {
return (short) getActiveSheetIndex();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
private void updateActiveSheetAfterSheetReorder(int oldIndex, int newIndex) {
// adjust active sheet if necessary
int active = getActiveSheetIndex();
if(active == oldIndex) {
// moved sheet was the active one
setActiveSheet(newIndex);
} else if ((active < oldIndex && active < newIndex) ||
(active > oldIndex && active > newIndex)) {
// not affected
} else if (newIndex > oldIndex) {
// moved sheet was below before and is above now => active is one less
setActiveSheet(active-1);
} else {
// remaining case: moved sheet was higher than active before and is lower now => active is one more
setActiveSheet(active+1);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
int active = getActiveSheetIndex();
if(active == index) {
内容来源于网络,如有侵权,请联系作者删除!