All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.poi.hssf.record.IndexRecord Maven / Gradle / Ivy

There is a newer version: 5.2.5
Show newest version
/* ====================================================================
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
==================================================================== */

package org.apache.poi.hssf.record;

import org.apache.poi.util.IntList;
import org.apache.poi.util.LittleEndianOutput;

/**
 * Title:        Index Record (0x020B)

* Description: Occurs right after BOF, tells you where the DBCELL records are for a sheet * Important for locating cells

* * REFERENCE: PG 323 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2) */ public final class IndexRecord extends StandardRecord implements Cloneable { public final static short sid = 0x020B; private int field_2_first_row; // first row on the sheet private int field_3_last_row_add1; // last row private int field_4_zero; // supposed to be zero private IntList field_5_dbcells; // array of offsets to DBCELL records public IndexRecord() { } public IndexRecord(RecordInputStream in) { int field_1_zero = in.readInt(); if (field_1_zero != 0) { throw new RecordFormatException("Expected zero for field 1 but got " + field_1_zero); } field_2_first_row = in.readInt(); field_3_last_row_add1 = in.readInt(); field_4_zero = in.readInt(); int nCells = in.remaining() / 4; field_5_dbcells = new IntList(nCells); for(int i=0; i





© 2015 - 2024 Weber Informatics LLC | Privacy Policy