Package org.apache.poi.hssf.record

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


            }
        }
        catch (Exception introspectionException)
        {
            introspectionException.printStackTrace();
            throw new RecordFormatException(
                "Unable to construct record instance, the following exception occured: " + introspectionException.getMessage());
        }
        if (retval instanceof RKRecord)
        {
            RKRecord     rk  = ( RKRecord ) retval;
View Full Code Here


                    short.class, short.class, byte [].class
                });
            }
            catch (Exception illegalArgumentException)
            {
                throw new RecordFormatException(
                    "Unable to determine record types");
            }
            result.put(new Short(sid), constructor);
        }
        return result;
View Full Code Here

        if (userCode != 0) break process;
      }
    }
    catch (IOException e)
    {
      throw new RecordFormatException("Error reading bytes" +
                        "while processing record sid="+sid);
    }
    return userCode;

    // Record[] retval = new Record[ records.size() ];
View Full Code Here

    return true;
  }

  private void checkNotPresent(Record rec) {
    if (rec != null) {
      throw new RecordFormatException("Duplicate PageSettingsBlock record (sid=0x"
          + Integer.toHexString(rec.getSid()) + ")");
    }
  }
View Full Code Here

  public void addLateHeaderFooter(Record rec) {
    if (_headerFooter != null) {
      throw new IllegalStateException("This page settings block already has a header/footer record");
    }
    if (rec.getSid() != UnknownRecord.HEADER_FOOTER_089C) {
      throw new RecordFormatException("Unexpected header-footer record sid: 0x" + Integer.toHexString(rec.getSid()));
    }
    _headerFooter = rec;
  }
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

        if (userCode != 0) break process;
      }
    }
    catch (IOException e)
    {
      throw new RecordFormatException("Error reading bytes");
    }
    return userCode;

    // Record[] retval = new Record[ records.size() ];
    // retval = ( Record [] ) records.toArray(retval);
View Full Code Here

            }
        }
        catch (Exception introspectionException)
        {
            introspectionException.printStackTrace();
            throw new RecordFormatException(
                "Unable to construct record instance, the following exception occured: " + introspectionException.getMessage());
        }
        if (retval instanceof RKRecord)
        {
            RKRecord     rk  = ( RKRecord ) retval;
View Full Code Here

                    RecordInputStream.class
                });
            }
            catch (Exception illegalArgumentException)
            {
                throw new RecordFormatException(
                    "Unable to determine record types");
            }
            result.put(new Short(sid), constructor);
        }
        return result;
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.