Package org.apache.poi.hssf.record

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


  private static BlankRecord newBlankRecord() {
    return newBlankRecord( 2, 2 );
  }

  private static BlankRecord newBlankRecord(int col, int row) {
    BlankRecord blankRecord = new BlankRecord();
    blankRecord.setRow( row );
    blankRecord.setColumn( (short) col );
    return blankRecord;
  }
View Full Code Here


  /**
   * Tests various manipulations of blank cells, to make sure that {@link MulBlankRecord}s
   * are use appropriately
   */
  public void testMultipleBlanks() {
    BlankRecord brA2 = newBlankRecord(0, 1);
    BlankRecord brB2 = newBlankRecord(1, 1);
    BlankRecord brC2 = newBlankRecord(2, 1);
    BlankRecord brD2 = newBlankRecord(3, 1);
    BlankRecord brE2 = newBlankRecord(4, 1);
    BlankRecord brB3 = newBlankRecord(1, 2);
    BlankRecord brC3 = newBlankRecord(2, 2);

    valueRecord.insertCell(brA2);
    valueRecord.insertCell(brB2);
    valueRecord.insertCell(brD2);
    confirmMulBlank(3, 1, 1);
View Full Code Here

    return lastcell;
  }

  public void addMultipleBlanks(MulBlankRecord mbr) {
    for (int j = 0; j < mbr.getNumColumns(); j++) {
      BlankRecord br = new BlankRecord();

      br.setColumn(( short ) (j + mbr.getFirstColumn()));
      br.setRow(mbr.getRow());
      br.setXFIndex(mbr.getXFAt(j));
      insertCell(br);
    }
  }
View Full Code Here

                }
                _record = lrec;
                break;

            case CELL_TYPE_BLANK :
                BlankRecord brec = null;

                if (cellType != _cellType)
                {
                    brec = new BlankRecord();
                }
                else
                {
                    brec = ( BlankRecord ) _record;
                }
                brec.setColumn(col);

                // During construction the cellStyle may be null for a Blank cell.
                brec.setXFIndex(styleIndex);
                brec.setRow(row);
                _record = brec;
                break;

            case CELL_TYPE_BOOLEAN :
                BoolErrRecord boolRec = null;
View Full Code Here

    case SSTRecord.sid:
      sstRecord = (SSTRecord) record;
      break;

    case BlankRecord.sid:
      BlankRecord brec = (BlankRecord) record;

      thisRow = brec.getRow();
      thisColumn = brec.getColumn();
      thisStr = "";
      break;
    case BoolErrRecord.sid:
      BoolErrRecord berec = (BoolErrRecord) record;
View Full Code Here

                (( LabelSSTRecord ) record).setRow(row);
                (( LabelSSTRecord ) record).setXFIndex(( short ) 0);
                break;

            case CELL_TYPE_BLANK :
                record = new BlankRecord();
                (( BlankRecord ) record).setColumn(col);
                (( BlankRecord ) record).setRow(row);
                (( BlankRecord ) record).setXFIndex(( short ) 0);
                break;
View Full Code Here

                }
                record = lrec;
                break;

            case CELL_TYPE_BLANK :
                BlankRecord brec = null;

                if (cellType != this.cellType)
                {
                    brec = new BlankRecord();
                }
                else
                {
                    brec = ( BlankRecord ) record;
                }
                brec.setColumn(getCellNum());

                // During construction the cellStyle may be null for a Blank cell.
                if (cellStyle != null)
                {
                    brec.setXFIndex(( short ) cellStyle.getIndex());
                }
                else
                {
                    brec.setXFIndex(( short ) 0);
                }
                brec.setRow(row);
                record = brec;
                break;

            case CELL_TYPE_BOOLEAN :
                BoolErrRecord boolRec = null;
View Full Code Here

                }
                _record = lrec;
                break;

            case CELL_TYPE_BLANK :
                BlankRecord brec = null;

                if (cellType != _cellType)
                {
                    brec = new BlankRecord();
                }
                else
                {
                    brec = ( BlankRecord ) _record;
                }
                brec.setColumn(col);

                // During construction the cellStyle may be null for a Blank cell.
                brec.setXFIndex(styleIndex);
                brec.setRow(row);
                _record = brec;
                break;

            case CELL_TYPE_BOOLEAN :
                BoolErrRecord boolRec = null;
View Full Code Here

        HSSFSheet sheet = workbook.createSheet("Sheet1");
        RowRecord rowRec = new RowRecord(ROW_IX);
        rowRec.setFirstCol((short)2);
        rowRec.setLastCol((short)5);

        BlankRecord br = new BlankRecord();
        br.setRow(ROW_IX);
        br.setColumn((short)COL_IX);

        sheet.getSheet().addValueRecord(ROW_IX, br);
        HSSFRow row = new HSSFRow(workbook, sheet, rowRec);
        HSSFCell cell = row.createCellFromRecord(br);
View Full Code Here

                }
                record = lrec;
                break;

            case CELL_TYPE_BLANK :
                BlankRecord brec = null;

                if (cellType != this.cellType)
                {
                    brec = new BlankRecord();
                }
                else
                {
                    brec = ( BlankRecord ) record;
                }
                brec.setColumn(col);

                // During construction the cellStyle may be null for a Blank cell.
                brec.setXFIndex(styleIndex);
                brec.setRow(row);
                record = brec;
                break;

            case CELL_TYPE_BOOLEAN :
                BoolErrRecord boolRec = null;
View Full Code Here

TOP

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

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.