Patent ID: 8407187

Claim:
A computer-implemented method of validating spreadsheet application workbook files, formatted according to a Binary Interchange File Format (BIFF), by sequentially accessing data records while allowing random data access within a sliding window, comprising: (a) initializing, by the computer, a plurality of variables representing a plurality of records stored in a BIFF file, the plurality of records comprising the sliding window, the sliding window being utilized by a spreadsheet application to allow random data access when validating the BIFF file, the sliding window comprising a plurality of records comprising a a first record, a current record, a previous record with respect to the current record, a record which is two records prior to the current record, a next record with respect to the current record, and a plurality of subsequent records with respect to the current record, wherein the plurality of records are stored in an array comprising: //m_rgRec[0] is always the first record of a list; //m_rgRec[1] is always two records ago; //m_rgRec[2] is always the previous record; //m_rgRec[3] is always the current record; //m_rgRec[4] is the next record; and PosAll m?rgRec[5]; (b) reading, by the computer, the current record from the BIFF file, the current record from the BIFF file being read by: calling a record access function to receive context information associated with the current record; and calling the function to read the current record based on the context information, the context information comprising at least some context information that is not contained within the BIFF file, the at least some context information being inferred from the BIFF file, the inferred context information comprising information from correlating groups of records and a computed position of the next record to be read from the BIFF file; (c) copying, by the computer, the current record to the first record for validation; (d) copying, by the computer, the current record to the previous record and the next record to the current record for validation; (e) determining, by the computer, whether all of the plurality of records in the BIFF file have been validated; (f) determining, by the computer, whether another record is present in the BIFF file upon determining that all of the plurality of records in the BIFF file have not been validated; (g) reading, by the computer, the another record into the next record upon determining that the another record is present in the BIFF file; (h) validating, by the computer, a type, size, and position associated with the current record in the BIFF file; (i) copying, by the computer, the previous record to the record which is two records prior to the current record; and (j) repeating, by the computer, the operations (d)-(i) for each of the plurality of records in the BIFF file.