Class: Window2Record
- Inherits:
-
BiffRecord
- Object
- BiffRecord
- Window2Record
- Defined in:
- lib/surpass/biff_record.rb
Overview
Record WINDOW2, BIFF8:
Offset Size Contents 0 2 Option flags (see below) 2 2 Index to first visible row 4 2 Index to first visible column 6 2 Colour index of grid line colour. Note that in BIFF2-BIFF7 an RGB colour is
written instead.
8 2 Not used 10 2 Cached magnification factor in page break preview (in percent); 0 = Default (60%) 12 2 Cached magnification factor in normal view (in percent); 0 = Default (100%) 14 4 Not used
In BIFF8 this record stores used magnification factors for page break preview and normal view. These values are used to restore the magnification, when the view is changed. The real magnification of the currently active view is stored in the SCL record. The type of the active view is stored in the option flags field (see below).
0 0001H 0 = Show formula results 1 = Show formulas
1 0002H 0 = Do not show grid lines 1 = Show grid lines
2 0004H 0 = Do not show sheet headers 1 = Show sheet headers
3 0008H 0 = Panes are not frozen 1 = Panes are frozen (freeze)
4 0010H 0 = Show zero values as empty cells 1 = Show zero values
5 0020H 0 = Manual grid line colour 1 = Automatic grid line colour
6 0040H 0 = Columns from left to right 1 = Columns from right to left
7 0080H 0 = Do not show outline symbols 1 = Show outline symbols
8 0100H 0 = Keep splits if pane freeze is removed 1 = Remove splits if pane freeze is removed
9 0200H 0 = Sheet not selected 1 = Sheet selected (BIFF5-BIFF8)
10 0400H 0 = Sheet not visible 1 = Sheet visible (BIFF5-BIFF8) 11 0800H 0 = Show in normal view 1 = Show in page break preview (BIFF8)
The freeze flag specifies, if a following PANE record describes unfrozen or frozen panes.
*** This class appends the optional SCL record ***
Record SCL, BIFF4-BIFF8:
This record stores the magnification of the active view of the current worksheet.
In BIFF8 this can be either the normal view or the page break preview.
This is determined in the WINDOW2 record. The SCL record is part of the
Sheet View Settings Block.
Offset Size Contents
0 2 Numerator of the view magnification fraction (num)
2 2 Denumerator [denominator] of the view magnification fraction (den)
The magnification is stored as reduced fraction. The magnification results from num/den.
SJM note: Excel expresses (e.g.) 25% in reduced form i.e. 1/4. Reason unknown. This code
writes 25/100, and Excel is happy with that.
Constant Summary collapse
- RECORD_ID =
0x023E
Constants inherited from BiffRecord
BiffRecord::BIFF_LIMIT, BiffRecord::CONTINUE_RECORD_ID
Instance Attribute Summary
Attributes inherited from BiffRecord
Instance Method Summary collapse
-
#initialize(options, first_visible_row, first_visible_col, grid_colour, preview_magn, normal_magn, scl_magn) ⇒ Window2Record
constructor
A new instance of Window2Record.
Methods inherited from BiffRecord
Constructor Details
#initialize(options, first_visible_row, first_visible_col, grid_colour, preview_magn, normal_magn, scl_magn) ⇒ Window2Record
Returns a new instance of Window2Record.
1140 1141 1142 1143 1144 1145 1146 |
# File 'lib/surpass/biff_record.rb', line 1140 def initialize(, first_visible_row, first_visible_col, grid_colour, preview_magn, normal_magn, scl_magn) scl_rec = '' scl_rec = [0x00A0, 4, scl_magn, 100].pack('v4') unless scl_magn == 0 args = [, first_visible_row, first_visible_col, grid_colour, 0x00, preview_magn, normal_magn, 0x00] @record_data = args.pack('v7V') + scl_rec end |