Class: FormulaRecord

Inherits:
BiffRecord show all
Defined in:
lib/surpass/biff_record.rb

Overview

Offset Size Contents 0 2 Index to row 2 2 Index to column 4 2 Index to XF record 6 8 Result of the formula 14 2 Option flags:

Bit Mask    Contents
0   0001H   1 = Recalculate always
1   0002H   1 = Calculate on open
3   0008H   1 = Part of a shared formula

16 4 Not used 20 var. Formula data (RPN token array)

Constant Summary collapse

RECORD_ID =
0x0006

Constants inherited from BiffRecord

BiffRecord::BIFF_LIMIT, BiffRecord::CONTINUE_RECORD_ID

Instance Attribute Summary

Attributes inherited from BiffRecord

#record_data

Instance Method Summary collapse

Methods inherited from BiffRecord

#record_header, #to_biff

Constructor Details

#initialize(row, col, xf_index, rpn, calc_flags = 0) ⇒ FormulaRecord

Returns a new instance of FormulaRecord.



1402
1403
1404
# File 'lib/surpass/biff_record.rb', line 1402

def initialize(row, col, xf_index, rpn, calc_flags = 0)
  @record_data = [row, col, xf_index, 0xFFFF000000000003, calc_flags & 0x03, 0].pack('v3QvV') + rpn
end