Package org.apache.poi.hssf.record

Examples of org.apache.poi.hssf.record.CellValueRecordInterface


            // Copy each cell from the source row to
            //  the destination row
            for(Iterator<Cell> cells = row.cellIterator(); cells.hasNext(); ) {
                HSSFCell cell = (HSSFCell)cells.next();
                row.removeCell( cell );
                CellValueRecordInterface cellRecord = cell.getCellValueRecord();
                cellRecord.setRow( rowNum + n );
                row2Replace.createCellFromRecord( cellRecord );
                sheet.addValueRecord( rowNum + n, cellRecord );

                HSSFHyperlink link = cell.getHyperlink();
                if(link != null){
View Full Code Here


        confirmCachedValue("70164", nc2);
        confirmCachedValue("90210", nc3);

        CellValueRecordInterface[] cvrs = ns.getSheet().getValueRecords();
        for (int i = 0; i < cvrs.length; i++) {
            CellValueRecordInterface cvr = cvrs[i];
            if(cvr instanceof FormulaRecordAggregate) {
                FormulaRecordAggregate fr = (FormulaRecordAggregate)cvr;

                if(i == 0) {
                    assertEquals(70164.0, fr.getFormulaRecord().getValue(), 0.0001);
View Full Code Here

    Sheet sheet = Sheet.createSheet();

    RowRecord rr = new RowRecord(5);
    sheet.addRow(rr);

    CellValueRecordInterface cvr = new BlankRecord();
    cvr.setColumn((short)0);
    cvr.setRow(5);
    sheet.addValueRecord(5, cvr);


    int dbCellRecordPos = getDbCellRecordPos(sheet);
    if (dbCellRecordPos == 252) {
View Full Code Here

            throw new RuntimeException("Specified cell is not from this row");
        }
        cells[column]=null;

        if(alsoRemoveRecords) {
            CellValueRecordInterface cval = cell.getCellValueRecord();
            sheet.getSheet().removeValueRecord(getRowNum(), cval);
        }
        if (cell.getColumnIndex()+1 == row.getLastCol()) {
            row.setLastCol(calculateNewLastCellPlusOne(row.getLastCol()));
        }
View Full Code Here

     * remove the HSSFCell from this row.
     * @param cell to remove
     */
    public void removeCell(HSSFCell cell)
    {
        CellValueRecordInterface cval = cell.getCellValueRecord();

        sheet.removeValueRecord(getRowNum(), cval);
        short column=cell.getCellNum();
        if(cell!=null && column<cells.length)
        {
View Full Code Here

        confirmCachedValue("70164", nc2);
        confirmCachedValue("90210", nc3);

        CellValueRecordInterface[] cvrs = ns.getSheet().getValueRecords();
        for (int i = 0; i < cvrs.length; i++) {
            CellValueRecordInterface cvr = cvrs[i];
            if(cvr instanceof FormulaRecordAggregate) {
                FormulaRecordAggregate fr = (FormulaRecordAggregate)cvr;

                if(i == 0) {
                    assertEquals(70164.0, fr.getFormulaRecord().getValue(), 0.0001);
View Full Code Here

    int thisRow;
    int thisColumn;


    if (record instanceof CellValueRecordInterface) {
      CellValueRecordInterface valueRec = (CellValueRecordInterface) record;
      thisRow = valueRec.getRow();
      thisColumn = valueRec.getColumn();
    } else {
      thisRow = -1;
      thisColumn = -1;

      switch (record.getSid()) {
View Full Code Here

    Sheet sheet = Sheet.createSheet();

    RowRecord rr = new RowRecord(5);
    sheet.addRow(rr);

    CellValueRecordInterface cvr = new BlankRecord();
    cvr.setColumn((short)0);
    cvr.setRow(5);
    sheet.addValueRecord(5, cvr);


    int dbCellRecordPos = getDbCellRecordPos(sheet);
    if (dbCellRecordPos == 252) {
View Full Code Here

            // Copy each cell from the source row to
            //  the destination row
            for(Iterator<Cell> cells = row.cellIterator(); cells.hasNext(); ) {
                HSSFCell cell = (HSSFCell)cells.next();
                row.removeCell( cell );
                CellValueRecordInterface cellRecord = cell.getCellValueRecord();
                cellRecord.setRow( rowNum + n );
                row2Replace.createCellFromRecord( cellRecord );
                _sheet.addValueRecord( rowNum + n, cellRecord );

                HSSFHyperlink link = cell.getHyperlink();
                if(link != null){
View Full Code Here

   * starting from startIx.
   */
  private static int countBlanks(CellValueRecordInterface[] rowCellValues, int startIx) {
    int i = startIx;
    while(i < rowCellValues.length) {
      CellValueRecordInterface cvr = rowCellValues[i];
      if (!(cvr instanceof BlankRecord)) {
        break;
      }
      i++;
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.record.CellValueRecordInterface

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.