Package org.apache.poi.hssf.record

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


          // if there is only one
          // records, it will go here too.
        }
        else
          {
                                  throw new RecordFormatException("Records should handle ContinueRecord internally. Should not see this exception");
        }
      }
      if (rec != null)
      {
        userCode = req.processRecord(rec);
View Full Code Here


      return field_2_first_col;
    }   

    public String toFormulaString(Workbook book)
    {
        throw new RecordFormatException("Coding Error: Expected ExpPtg to be converted from Shared to Non-Shared Formula");
    }
View Full Code Here

          token_3_arrayValues[x][y] = new Double(in.readDouble());
            } else if (grbit == 0x02) {
              //Ignore the doco, it is actually a unicode string with all the
              //trimmings ie 16 bit size, option byte etc
              token_3_arrayValues[x][y] = in.readUnicodeString();
            } else throw new RecordFormatException("Unknown grbit '"+grbit+"'");
          }
        }

    }
View Full Code Here

      return field_2_first_col;
    }   

    public String toFormulaString(Workbook book)
    {
        throw new RecordFormatException("Coding Error: Expected ExpPtg to be converted from Shared to Non-Shared Formula by ValueRecordsAggregate, but it wasn't");
    }
View Full Code Here

 
  public final short getSid() {
    return -1;
  }
  public int serialize(int offset, byte[] data) {
    throw new RecordFormatException("Cannot serialize a dummy record");
  }
View Full Code Here

  }
  public int serialize(int offset, byte[] data) {
    throw new RecordFormatException("Cannot serialize a dummy record");
  }
  public final int getRecordSize() {
    throw new RecordFormatException("Cannot serialize a dummy record");
  }
View Full Code Here

    if (svm == null) {
      throw new IllegalArgumentException("sfm must not be null");
    }
    if (formulaRec.hasCachedResultString()) {
      if (stringRec == null) {
        throw new RecordFormatException("Formula record flag is set but String record was not found");
      }
      _stringRecord = stringRec;
    } else {
      // Usually stringRec is null here (in agreement with what the formula rec says).
      // In the case where an extra StringRecord is erroneously present, Excel (2007)
View Full Code Here

   */
  private static void handleMissingSharedFormulaRecord(FormulaRecord formula) {
    // make sure 'unshared' formula is actually available
    Ptg firstToken = formula.getParsedExpression()[0];
    if (firstToken instanceof ExpPtg) {
      throw new RecordFormatException(
          "SharedFormulaRecord not found for FormulaRecord with (isSharedFormula=true)");
    }
    // could log an info message here since this is a fairly unusual occurrence.
    formula.setSharedFormula(false); // no point leaving the flag erroneously set
  }
View Full Code Here

    public int getColumn() {
      return field_2_first_col;
    }

    public String toFormulaString() {
        throw new RecordFormatException("Coding Error: Expected ExpPtg to be converted from Shared to Non-Shared Formula by ValueRecordsAggregate, but it wasn't");
    }
View Full Code Here

            throw new IllegalArgumentException("sfm must not be null");
        }
        boolean hasStringRec = stringRec != null;
        boolean hasCachedStringFlag = formulaRec.hasCachedResultString();
        if (hasStringRec != hasCachedStringFlag) {
            throw new RecordFormatException("String record was "
                    + (hasStringRec ? "": "not ") + " supplied but formula record flag is "
                    + (hasCachedStringFlag ? "" : "not ") + " set");
        }

        if (formulaRec.isSharedFormula()) {
View Full Code Here

TOP

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

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.