本文整理了Java中org.apache.poi.hssf.usermodel.HSSFWorkbook.updateActiveSheetAfterSheetReorder()
方法的一些代码示例,展示了HSSFWorkbook.updateActiveSheetAfterSheetReorder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFWorkbook.updateActiveSheetAfterSheetReorder()
方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFWorkbook
类名称:HSSFWorkbook
方法名:updateActiveSheetAfterSheetReorder
暂无
代码示例来源:origin: org.apache.poi/poi
/**
* sets the order of appearance for a given sheet.
*
* @param sheetname the name of the sheet to reorder
* @param pos the position that we want to insert the sheet into (0 based)
*/
@Override
public void setSheetOrder(String sheetname, int pos ) {
int oldSheetIndex = getSheetIndex(sheetname);
_sheets.add(pos,_sheets.remove(oldSheetIndex));
workbook.setSheetOrder(sheetname, pos);
FormulaShifter shifter = FormulaShifter.createForSheetShift(oldSheetIndex, pos);
for (HSSFSheet sheet : _sheets) {
sheet.getSheet().updateFormulasAfterCellShift(shifter, /* not used */ -1 );
}
workbook.updateNamesAfterCellShift(shifter);
updateNamedRangesAfterSheetReorder(oldSheetIndex, pos);
updateActiveSheetAfterSheetReorder(oldSheetIndex, pos);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* sets the order of appearance for a given sheet.
*
* @param sheetname the name of the sheet to reorder
* @param pos the position that we want to insert the sheet into (0 based)
*/
@Override
public void setSheetOrder(String sheetname, int pos ) {
int oldSheetIndex = getSheetIndex(sheetname);
_sheets.add(pos,_sheets.remove(oldSheetIndex));
workbook.setSheetOrder(sheetname, pos);
FormulaShifter shifter = FormulaShifter.createForSheetShift(oldSheetIndex, pos);
for (HSSFSheet sheet : _sheets) {
sheet.getSheet().updateFormulasAfterCellShift(shifter, /* not used */ -1 );
}
workbook.updateNamesAfterCellShift(shifter);
updateNamedRangesAfterSheetReorder(oldSheetIndex, pos);
updateActiveSheetAfterSheetReorder(oldSheetIndex, pos);
}
内容来源于网络,如有侵权,请联系作者删除!