Package org.zkoss.poi.ss.formula

Examples of org.zkoss.poi.ss.formula.PtgShifter


    return changeMerges;
  }
 
  private static void shiftFormulas(Set<Ref> all, Worksheet sheet, int startRow, int endRow, int nRow, int startCol, int endCol, int nCol) {
    final int moveSheetIndex = sheet.getWorkbook().getSheetIndex(sheet);
        final PtgShifter shifter97 = new PtgShifter(moveSheetIndex, startRow, endRow, nRow, startCol, endCol, nCol, SpreadsheetVersion.EXCEL97);
        final PtgShifter shifter2007 = new PtgShifter(moveSheetIndex, startRow, endRow, nRow, startCol, endCol, nCol, SpreadsheetVersion.EXCEL2007);
    for (Ref ref : all) {
      final int tRow = ref.getTopRow();
      final int lCol = ref.getLeftCol();
      final Worksheet srcSheet = getSheet(sheet, ref.getOwnerSheet());
      final Book srcBook = (Book) srcSheet.getWorkbook();
View Full Code Here


        //update named ranges
        if (startRow <= endRow) {
          final XSSFWorkbook wb = getWorkbook();
          int sheetIndex = wb.getSheetIndex(this);
          final PtgShifter shifter = new PtgShifter(sheetIndex, startRow, endRow, n, 0, maxcol, 0, SpreadsheetVersion.EXCEL2007);
          updateNamedRanges(wb, shifter);
        }
       
        return shiftedRanges;
    }
View Full Code Here

       
        //update named ranges
        if (startRow <= endRow) {
          final XSSFWorkbook wb = getWorkbook();
          int sheetIndex = wb.getSheetIndex(this);
          final PtgShifter shifter = new PtgShifter(sheetIndex, startRow, endRow, n, 0, maxcol, 0, SpreadsheetVersion.EXCEL2007);
          updateNamedRanges(wb, shifter);
        }

        return shiftedRanges;
  }
View Full Code Here

        // Update any formulas on this sheet that point to
        // columns which have been moved
        if (startCol <= endCol) {
          XSSFWorkbook book = getWorkbook();
          int sheetIndex = book.getSheetIndex(this);
          PtgShifter shifter = new PtgShifter(sheetIndex, 0, maxrow, 0, startCol, endCol, n, SpreadsheetVersion.EXCEL2007);
          updateNamedRanges(book, shifter);
        }
       
        return shiftedRanges;
    }
View Full Code Here

        // Update any formulas on this sheet that point to
        // columns which have been moved
        if (startCol <= endCol) {
          XSSFWorkbook book = getWorkbook();
          int sheetIndex = book.getSheetIndex(this);
          PtgShifter shifter = new PtgShifter(sheetIndex, 0, maxrow, 0, startCol, endCol, n, SpreadsheetVersion.EXCEL2007);
          updateNamedRanges(book, shifter);
        }
       
        return shiftedRanges;
    }
View Full Code Here

        // Update any formulas on this sheet that point to
        // columns which have been moved
        if (tRow <= bRow && lCol <= rCol) {
          XSSFWorkbook book = getWorkbook();
          int sheetIndex = book.getSheetIndex(this);
          PtgShifter shifter = new PtgShifter(sheetIndex, tRow, bRow, nRow, lCol, rCol, nCol, SpreadsheetVersion.EXCEL2007);
          updateNamedRanges(book, shifter);
        }
       
        return shiftedRanges;
    }
View Full Code Here

        // Update any formulas on this sheet that point to
        //  rows which have been moved
        if (startRow <= endRow) {
          int sheetIndex = _workbook.getSheetIndex(this);
          short externSheetIndex = _book.checkExternSheet(sheetIndex, sheetIndex);
          PtgShifter shifter = new PtgShifter(externSheetIndex, startRow, endRow, n, 0, maxcol, 0, SpreadsheetVersion.EXCEL97);
          updateNamesAfterCellShift(shifter);
        }
       
        return shiftedRanges;
    }
View Full Code Here

        // Update any formulas on this sheet that point to
        // columns which have been moved
        if (startCol <= endCol) {
          int sheetIndex = _workbook.getSheetIndex(this);
          short externSheetIndex = _book.checkExternSheet(sheetIndex, sheetIndex);
          PtgShifter shifter = new PtgShifter(externSheetIndex, 0, SpreadsheetVersion.EXCEL97.getLastRowIndex(), 0, startCol, endCol, n, SpreadsheetVersion.EXCEL97);
          updateNamesAfterCellShift(shifter);
        }
       
        return shiftedRanges;
    }
View Full Code Here

        // Update any formulas on this sheet that point to
        // columns which have been moved
        if (startCol <= endCol) {
          int sheetIndex = _workbook.getSheetIndex(this);
          short externSheetIndex = _book.checkExternSheet(sheetIndex, sheetIndex);
          PtgShifter shifter = new PtgShifter(externSheetIndex, tRow, bRow, 0, startCol, endCol, n, SpreadsheetVersion.EXCEL97);
          updateNamesAfterCellShift(shifter);
        }
       
        return shiftedRanges;
    }
View Full Code Here

        // Update any formulas on this sheet that point to
        //  rows which have been moved
        if (startRow <= endRow) {
          int sheetIndex = _workbook.getSheetIndex(this);
          short externSheetIndex = _book.checkExternSheet(sheetIndex, sheetIndex);
          PtgShifter shifter = new PtgShifter(externSheetIndex, startRow, endRow, n, lCol, rCol, 0, SpreadsheetVersion.EXCEL97);
          updateNamesAfterCellShift(shifter);
        }
       
        return shiftedRanges;
    }
View Full Code Here

TOP

Related Classes of org.zkoss.poi.ss.formula.PtgShifter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.