github.com/shakinm/xlsReader@v0.9.12/xls/record/row.go (about)

     1  package record
     2  
     3  // ROW: Describes a Row
     4  
     5  var RowRecord = []byte{0x08, 0x02} // (208h)
     6  
     7  /*
     8  A ROW record describes a single row on an Excel sheet. ROW records and their
     9  associated cell records occur in blocks of up to 32 rows. Each block ends with a
    10  DBCELL record.
    11  
    12  Record Data
    13  Offset		Name		Size		Contents
    14  --------------------------------------------
    15  4 			rw			2			Row number.
    16  6			colMic		2			First defined column in the row.
    17  8			colMac		2			Last defined column in the row, plus 1.
    18  10			miyRw		2			Row height.
    19  12			irwMac		2			Used by Excel to optimize loading the file; if you are creating a BIFF file, set irwMac to 0.
    20  14 			(Reserved) 	2
    21  16			grbit		2			Option flags.
    22  18			ixfe		2			If fGhostDirty=1 (see grbit structure), this is the index to the XF record for the row.
    23  									Otherwise, this structure is undefined.
    24  									Note: ixfe uses only the low-order 12 bits of the structure
    25  									(bits 11–0). Bit 12 is fExAsc , bit 13 is fExDsc , and bits
    26  									14 and 15 are reserved. fExAsc and fExDsc are set to
    27  									true if the row has a thick border on top or on bottom,
    28  									respectively.
    29  
    30  The grbit structure contains the following option flags:
    31  Offset		Bits		Mask		Name			Contents
    32  --------------------------------------------------------
    33  0			2–0			07h			iOutLevel		Outline level of the row
    34  			3			08h			(Reserved)
    35  			4			10h			fCollapsed		=1 if the row is collapsed in outlining
    36  			5			20h			fDyZero			=1 if the row height is set to 0 (zero)
    37  			6			40h			fUnsynced		=1 if the font height and row height are not compatible
    38  			7			80h			fGhostDirty		=1 if the row has been formatted, even if it contains all blank cells
    39  1			7–0			FFh			(Reserved)
    40  
    41  The rw structure contains the 0-based row number. The colMic and colMac fields give
    42  the range of defined columns in the row.
    43  
    44  The miyRw structure contains the row height, in units of 1/20 th of a point. The miyRw
    45  structure may have the 8000h (2 15 ) bit set, indicating that the row is standard height.
    46  The low-order 15 bits must still contain the row height. If you hide the row — either
    47  by setting row height to 0 (zero) or by using the Hide command — miyRw still
    48  contains the original row height. This allows Excel to restore the original row height
    49  when you click the Unhide button.
    50  Each row can have default cell attributes that control the format of all undefined cells
    51  in the row. By specifying default cell attributes for a particular row, you are
    52  effectively formatting all the undefined cells in the row without using memory for
    53  those cells. Default cell attributes do not affect the formats of cells that are explicitly
    54  defined.
    55  For example, if you want all of row 3 to be left-aligned, you could define all 256 cells
    56  in the row and specify that each individual cell be left-aligned. This would require
    57  storage for each of the 256 cells. An easy alternative would be to set the default cell
    58  for row 3 to be left-aligned and not define any individual cells in row 3.
    59  
    60  */
    61  
    62  type Row struct {
    63  	Rw       [2]byte
    64  	ColMic   [2]byte
    65  	ColMac   [2]byte
    66  	MiyRw    [2]byte
    67  	IrwMac   [2]byte
    68  	Reserved [2]byte
    69  	Grbit    [2]byte
    70  	Ixfe     [2]byte
    71  }