Jump to Navigation

Sheet Basic Structures

Sheet Basic Structures

Several structures seem specific for the Sheet program.

Sheet Dates

A date is encoded as either a SInt or a Float. Its integer value is the number of days elapsed since December 31,1899 (day 0), its fractional part encodes the time as fraction of (decimal) 24 hours. So January 1, 1900 midnight would be encoded as 1, while January 1, noon would be encoded as (decimal) 1.5.

Internally, sheet dates are treated exactly like numbers, and all numeric operations may be applied to them.

Sheet Cell Offset

Cell offsets can either be absolute (relative to cell A1) or relative (relative to the current cell).

 Start   End    Description

0000 bit 0 0003 bit 5 Offset (number of cells)
0003 bit 6 Relative (0) or absolute (1) offset
0003 bit 7 Positive (0, right/down) or negitive (1, up/left) offset

Sheet Cell Reference

Reference a single cell.

 Data      Description

Sheet Cell Offset Vertical offset
Sheet Cell Offset Horizontal offset
B Unknown: (always 00?) (Worksheet number?)

Sheet Cell Block

Reference a block of cells.

 Data      Description

Sheet Cell Offset Vertical offset first cell
Sheet Cell Offset Horizontal offset first cell
B Unknown (always 00?) (Worksheet number?)
Sheet Cell Offset Vertical offset last cell
Sheet Cell Offset Horizontal offset last cell
B Unknown (always 00?) (Worksheet number?)

Sheet Number Format

Determines how a number is displayed. The number of decimals is not relevant for all formats.

 Data          Description

B Always 02?
Sheet Number Format Code Number format
B Decimals (bit 1 to 7)

Sheet Number Format Code

 code display as

00 general
02 fixed decimal
04 scientific
06 currency
08 percent
0A triads (every 3 digits separated)
0C boolean (true/false)
0E text
10 "d/mm" (eg. 1.3 for March 1)
12 "mm/d" (eg. 3.1 for March 1)
14 "dd/mm/yy" (eg. 01.03.2000)
16 "mm/dd/yy"
18 "yy/mm/dd"
1A "d mmm" (eg. 1 Mar)
1C "d mmm yy"
1E "dd mmm yyyy"
20 "mmm"
22 "monthname" (eg. March)
24 "mmm yy"
26 "monthname yy"
28 "monthname dd, yyyy"
2A "dd.mm.yyyy hh:ii ampm"
2C "dd.mm.yyyy HH:ii"
2E "mm.dd.yyyy hh:ii ampm"
30 "mm.dd.yyyy HH:ii"
32 "yyyy.mm.dd hh:ii ampm"
34 "yyyy.mm.dd HH:ii"
36 "hh:ii ampm" (eg. 1:25pm)
38 "hh:ii:ss ampm"
3A "HH:ii" (eg. 13:25)
3C "HH:ii:ss"

Sheet Cell Layout

 Data      Description

B Always 02 ?
B bit 0: default paragraph layout present (01) or not (00)
bit 1: default character layout present (1) or not (00)
bit 2: default number format present (1) or not (00)
(*) Paragraph Layout List Default paragraph layout
(*) Character Layout List Default character layout
(*) Sheet Number Format Default number format

Sheet Variable Reference

Sheet variables are referenced by number. Each variable in the Sheet Variable List has its own number encoded in it.

 Data      Description

L Variable reference number



Psifiles | by Dr. Radut