home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d553 / faff.lha / FAFF / FAFF.doc next >
Text File  |  1991-10-28  |  24KB  |  819 lines

  1. FAFF V2.0 (Last editted June 15, 1991)
  2.  
  3. The following is a description of the file format used by Professional
  4. Calc V1.0, and Advantage (V1.1 and greater).  This file format is also
  5. supported by Office.  The Advantage and Office Calc formats are subsets
  6. of the Professional Calc format.  Note that this description does not
  7. carry any kind of warranty, and that the technical support group of
  8. Gold Disk will not answer any questions about it (mainly because they
  9. are not aquainted with the file format specifications). The
  10. specification can change at any time without prior notification;
  11. however, we will make sure that we do not obsolete previous FAFF
  12. readers and writers (which include our own).  Gold Disk is placing this
  13. information into the public domain to help third party developpers or
  14. users who wish to read or write ProCalc files into their own
  15. applications.
  16.  
  17. Structure
  18.  
  19. The concepts behind the structure of FAFF (Fast Advantage File Format) are
  20. similiar to those used by Lotus 123 and IFF.  The file format is broken
  21. into chunks.  Each chunk has a one BYTE header number, which describes
  22. what kind of chunk it is.  Next comes the length bits (which are two
  23. BYTEs long), followed by the data.  NOTE: the length bits specify the
  24. length of the data area only.  So one might say that the actual length of
  25. a chunk is the value stored in the two length bits, plus three (size of
  26. header and the length bits).
  27.  
  28. The structure of FAFF allows the file format to be expanded without
  29. obsoleting previous files.  It also makes it easier for third parties to
  30. look at the file format; they only have to save and load information that
  31. is relevant to their application.  What follows is a description of the
  32. chunks currently used by FAFF.  NOTE: the chunks defined are the ONLY
  33. legal chunks.  People who add in their own chunks may have their files
  34. break under future versions of the official Gold Disk FAFF reader program.
  35. However, people may submit new chunk definitions to Gold Disk at an
  36. address listed at the end of the document, and a chunk number will be
  37. supplied to them.
  38.  
  39. When there is a descrepancy between this document, and the actual file
  40. format generated by The ProCalc, the latter is to be considered correct.
  41.  
  42.  
  43. Changes in this document:
  44.  
  45. V1.0 : Initial release
  46.  
  47. V1.1 :
  48.   LinkDisk spreadsheet function number listed.
  49.  
  50.   V1.0 of this document incorrectly listed the bits in the Cell Data
  51.   section.  Corrected in this version.
  52.  
  53. V2.0 :
  54.   Covers new additions to the format in Professional Calc:
  55.  
  56.   Pallete Chunk
  57.   Column Width Chunk
  58.   Row Height Chunk
  59.   New Spreadsheet function numbers listed
  60.     - @() and RexxFun.
  61.   New Bits in the Data area of a cell listed
  62.   Password chunk
  63.   Default Row and Column format chunk
  64.   Version Chunk
  65.   Style Tag Chunks
  66.   Outline chunks
  67.   Extended Cell chunks
  68.   Blank Cell Information
  69.  
  70.   Miscelaneous typos fixed, and better descriptions added.
  71.  
  72.  
  73.  
  74. Important Notes:
  75.  
  76. All data is stored using 680x0 ordering of the bytes.  An FAFF reader
  77. for IBM class machines would have to swap the the ordering of the
  78. bytes on words.  On long words, they would have to swap the ordering
  79. of bytes in each of the words, then swap the two words.
  80.  
  81. ProCalc (as well as Office and Advantage) store spreadsheet cells in
  82. a sparse matrix.  This means that only cells which contain data are
  83. kept in memory and on disk.  This means that entire rows and columns
  84. could be empty; these empty cells are not stored on disk in any way.
  85.  
  86. Rows and Columns are stored starting from 1; ie Column A is
  87. represented as 1, B as 2, etc.
  88.  
  89. All formulas in ProCalc are stored in a tockenize Reverse Polish
  90. Notation (RPN) format.  This format is described later on in the
  91. document.
  92.  
  93.  
  94.  
  95. Chunk Descriptions
  96.  
  97. - End Of File
  98. Header: 0
  99. Length: 0
  100. Description: Signals the end of information of a FAFF file.  MUST be at
  101. the end of the file.
  102.  
  103. - Begin Of File
  104. Header: 1
  105. Length: 4
  106. Description : This chunk is used to identify this file as truly being a
  107. FAFF file.  The data part consists of the magic number 681281268 (in
  108. unsigned long integer format).  MUST be the first chunk.
  109.  
  110. - Dimensions
  111. Header: 2
  112. Length: 8
  113. Description :
  114. Bytes 0-1 : Maximum number of rows of the spreadsheet matrix.  Must be
  115. greater than 0.
  116.  
  117. Bytes 2-3 : Maximum number of columns of the spreadsheet matrix.  Must be
  118. greater than 0.
  119.  
  120. Bytes 4-5 : Higest row that contains spreadsheet data.
  121.  
  122. Bytes 5-7 : Highest column that contains spreadsheet data.
  123.  
  124. - Column Widths (Only used by Office Calc, Graph and Advantage)
  125. Header: 4
  126. Length: 3
  127. Description: Bytes 0-1 are the column number.  Byte 2 is the actual width
  128. of the column.  The only column widths that need to be stored are those
  129. that are different from 9.  This is the column width in characters
  130. (topaz 8 characters to be specific).  This chunk is only found in 1.x
  131. files of Advantage, and in Office Calc and Office Graph.
  132.  
  133. - Named Cell
  134. Header: 8
  135. Length: 20
  136. Description:
  137. Bytes 0-1: Row of the named cell.
  138. Bytes 2-3: Column of the named cell.
  139. Bytes 4-19: NULL terminated string which is the "Name" of this cell.
  140.  
  141. - Named Range
  142. Header: 9
  143. Length: 24
  144. Description:
  145. Bytes 0-1: Row 1 of the named range.
  146. Bytes 2-3: Column 1 of the named range.
  147. Bytes 4-5: Row 2 of the named range.
  148. Bytes 6-7: Column 2 of the named range.
  149. Bytes 8-23: NULL terminated string which is the "Name" of this range.
  150.  
  151. - User Defined Formula
  152. Header: 10
  153. Length: Variable
  154. Description:
  155. Bytes 0-15: Null terminated string which is the name of the formula.
  156. Bytes 16- : RPN Stack Structure (described later on).
  157.  
  158. - Version Number (Only used by ProCalc)
  159. Header: 15
  160. Length:  2
  161. Description: Bytes 0-1 is the version number of the file format.  If
  162. the file is a ProCalc V1.0 file (or above) than the version should
  163. be set to 4.  If the file is intended for previous versions of The
  164. Advantage, then omit the chunk all together.  This chunk is only used
  165. by ProCalc 1.0 and above.
  166.  
  167. - Default formats for a Row or Column (Only used by ProCalc)
  168. Header: 16 (for a column)
  169.         17 (for a row)
  170. Length: 38
  171.  
  172. Description: ProCalc can set up default formats for a row or a column;
  173. this way, the user can pre-format entire rows or columns.
  174.  
  175. Byte  0   : row or column number
  176. Bytes 1-27 : Name of the font
  177. Bytes 28-29 : Y Size of the font
  178. Bytes 30-33 : Cell flags (described later)
  179. Bytes 34-35 : New Cell flags (described later)
  180. Byte  36    : Color number
  181. Byte  37    : Style Tag number
  182.  
  183. - 16 color pallete
  184. Header: 21  (Office Calc, Graph and Advantage use a header of 20)
  185. Length: 96
  186. Description: Bytes 0-5 are the RGB values of color 0 in the pallete.
  187.              Bytes 6-11 are the RGB values of color 1 in the pallete.
  188.              etc.
  189.              2 Bytes for each color value.
  190.  
  191.              NOTE: Previous versions of the FAFF used a header of
  192.                    20 for the pallete.  However, ProCalc has
  193.                    a different pallete, and depends on certain colors
  194.                    being there.  So I, in my infinite wisdom, decided
  195.                    to obsolete the previous pallete definition so old
  196.                    spreadsheets wouldn't mess up the colors.
  197.  
  198. - 256 color pallete (currently ignored)
  199. Header: 22
  200. Length: 1536
  201. Description: Bytes 0-5 are the RGB values of color 0 in the pallete.
  202.              Bytes 6-11 are the RGB values of color 1 in the pallete.
  203.              etc.
  204.  
  205. - Column Width (Only used by ProCalc)
  206. Header: 25
  207. Length:  5
  208. Description: Bytes 0-1 are the column number.  Bytes 2-3 are the actual
  209. width of the column in pixels.  The only column widths that need to be
  210. stored are those that are different from 72.  The last byte are the
  211. flags for this column.  (Those flags will be listed at the end of this
  212. document).  This chunk is only used by ProCalc V1.0 and above.
  213.  
  214. - Row Heights (Only used by ProCalc)
  215. Header: 26
  216. Length:  6
  217. Description: Bytes 0-1 : RowNumber
  218.                    2-3 : Width
  219.                    4   : Row flags (same as the column flags)
  220.                    5   : The size of the largest font descender in the
  221.                          row.
  222.  
  223. - Global Window Information
  224. Header: 30
  225. Length: 14
  226. Description:
  227.  
  228. Bytes 0-1: Number of frozen row (if any)
  229. Bytes 2-3: Number of frozen col (if any)
  230. Bytes 4-7: Unused, but reserved. (can be set to zero)
  231. Bytes 8-9: Jump: After return key is hit number of cells to jump.
  232. Bytes 10-11: Bitset of window information.  Defined later on in document.
  233. Byte 12: Boolean value.  If 1, then a row is frozen.  If 0, then no row
  234.          is frozen.
  235. Byte 13: Boolean value.  If 1, then a column is frozen.  If 0, then no
  236.          column is frozen.
  237.  
  238. - Database, and Iterations.
  239. Header: 35
  240. Length: 18
  241. Description:
  242. Bytes 0-1: Number of spreadsheet iterations.
  243. Bytes 2-9: Criteria Range
  244. Bytes 10-17 : Database Range
  245.  
  246. - Graph information
  247. Header: 40-49
  248. Length: Not applicable.
  249. Description: Chunks 40-49 store graphing information for ProCalc.
  250. However, at this time, we are not going to be releasing the description
  251. of the graphing chunk to the public.  At some future point we may, but
  252. not right now.
  253.  
  254. - Macro File Information
  255. Header: 50
  256. Length: 201
  257. Description: The full path name of a macro file to be auto-loaded.
  258. Only one macro file can be auto loaded per spreadsheet.
  259.  
  260. - Macro Auto Execute
  261. Header: 51
  262. Length: 19
  263. Description: The name of a macro to auto-execute when the spreadsheet
  264. finishes loading.  Only one macro can be auto-executed per spreadsheet,
  265. although ProCalc does allow one macro to call another.  NOTE: If
  266. there is no pre-loaded macro file, then an error will be generated.
  267.  
  268. - ARexx Auto Execute
  269. Header: 52
  270. Length: 401
  271. Description: The full path name of an ARexx file to auto-execute after
  272. the spreadsheet finishes loading.  May include command line parameters
  273. to the ARexx script.  The ARexx script will execute AFTER any macro files
  274. are loaded and executed; ARexx can then be guaranteed to have some macros
  275. in memory if necessary.
  276.  
  277. - Style Tag Chunk (Only used by ProCalc)
  278. Header: 60
  279. Length: Variable
  280. Description: This chunk stores the style tags.
  281.  
  282. The first section of this chunk stores a null terminated string of
  283. variable length which is the name of the font for this style tag.  The
  284. next two bytes store the size of the font.  The next bytes are as
  285. follows:
  286.  
  287. Bytes 0-15 : The name of the StyleTag
  288. Byte  16   : The ID of the styletag (note, there can be up to 255 unique
  289.              style tags in a ProCalc file).
  290. Byte  17   : The Color of the style tag
  291. Bytes 18-21: The Cell BitSet (described later on in the document)
  292. Bytes 22-23: The New Cell BitSet (described later on in the document)
  293.  
  294. - Outline Chunk (Only used by ProCalc)
  295. Header: 65
  296. Length:  8
  297. Description: Stores the information for an outline.
  298.  
  299. Bytes 0-1: The first row or column of the outline.
  300. Bytes 2-3: The last row or column of the outline.
  301. Bytes 3-4: The visible row or column from the outline
  302. Byte  5  : If set to 1, then this is a row oriented outline.  If set to
  303.            0, a column oriented outline.
  304. Byte  6  : If set to 1, then this outline is on (ie the data is hidden).
  305.            If set to 0, then the outline is off.
  306.  
  307. - Password (Only used by ProCalc)
  308. Header: 80
  309. Length: Variable
  310. Description: This chunk store the password (if any) that the user would
  311. need to enter on reading a file.  The password itself is encrypted;
  312. however, to read the spreadsheet, just skip this chunk.  The rest of the
  313. spreadsheet is not encrypted.
  314.  
  315. - Label Cell information.
  316. Header: 100
  317. Length: Variable
  318. Description: Place where a cell containing only text is stored.
  319.  
  320. Bytes 0-1: Row of cell.
  321. Bytes 2-3: Column of cell.
  322. Bytes 4-7: Cell Bitset (described later)
  323. Byte 8: Color of cell
  324. Cell Note : StringPointer type (described later).  Cell note text of the
  325.             cell.
  326. Display   : StringPointer type.  Actual text of the cell.
  327.  
  328. - Blank Cell information (Only used by ProCalc)
  329. Header: 105
  330. Length: Variable
  331. Description: Stores cells that only contain formatting information (such
  332. as when the user selects a blank range, sets the format of that range
  333. to times, then expects any cell entries in that range to be times)
  334.  
  335. Bytes 0-1: Row of cell.
  336. Bytes 2-3: Column of cell.
  337. Bytes 4-7: Cell Bitset (described later)
  338. Byte 8: Color of cell
  339. Byte 9: Actual length of Display area.
  340. Byte 10: Error value of cell.
  341. Byte 11: Reserved.
  342. CellNote : StringPointer type.
  343.  
  344.  
  345. - Number Cell information.
  346. Header: 110
  347. Length: Variable
  348. Description: Place where a cell containing only a number is stored.
  349.  
  350. Bytes 0-1: Row of cell.
  351. Bytes 2-3: Column of cell.
  352. Bytes 4-7: Cell Bitset (described later)
  353. Byte 8: Color of cell
  354. Byte 9: Actual length of Display area.
  355. Byte 10: Error value of cell.
  356. Byte 11: Reserved.
  357. Byte 12-19: IEEE number.
  358. CellNote : StringPointer type.
  359. Display : StringPointer type.  Displayed Text.  (Can be set to NULL)
  360.  
  361. - Formula Cell information.
  362. Header: 120
  363. Length: Variable
  364. Description: Place where a formula cell is stored.
  365. Bytes 0-1: Row of cell.
  366. Bytes 2-3: Column of cell.
  367. Bytes 4-7: Cell Bitset (described later)
  368. Byte 8: Color of cell
  369. Byte 9: Actual length of Display area in characters.
  370. Byte 10: Error value of cell.
  371. Byte 11: Reserved.
  372. Byte 12-19: IEEE number.
  373. CellNote : StringPointer type.
  374. Display : StringPointer type.  Displayed Text.  (Can be set to NULL)
  375. Formula : RPN Stack.
  376.  
  377.  
  378. - Extended Cell information. (Only used by ProCalc)
  379. Header: 125
  380. Length: Variable
  381. Description: New information was added to ProCalc's cell structure since
  382. Advantage 1.x.  However, instead of obsoleting the previous FAFF cell
  383. structures, the new information is stored in a separate chunk.  This
  384. chunk should come IMMEDIATELY after the chunk that describes the cell.
  385.  
  386. The first section of the chunk holds a NULL terminated string which is
  387. the font name of this cell.  The next two bytes hold the size of the font.
  388. The next bytes are as follows:
  389.  
  390. Bytes 0-1: The new cell bitset (to be described later)
  391. Bytes 2  : The style number of this cell.
  392.  
  393.  
  394.  
  395. Minimum File:
  396.  
  397. The smallest FAFF file will contain a Begin of File and an End of file
  398. chunk.  The rest will be assumed to be the data from an "Untitled"
  399. ProCalc spreadsheet.
  400.  
  401.  
  402.  
  403.  
  404.  
  405. Description of FAFF Data Types.
  406.  
  407. - Range
  408. Length : 4 Bytes
  409. Description: Bytes 0-1: row1 of the range
  410.              Bytes 2-3: column1
  411.              Bytes 4-5: row2
  412.              Bytes 6-7: column2
  413.  
  414. - String Pointer
  415. Length : Variable
  416. Description:  This is a pseudo variable length NULL terminated string.
  417. The first BYTE is the length of the remaining data portion of the string.
  418. If the first BYTE is 0, then the String Pointer is assumed to be a NULL
  419. Pointer.  NOTE: This implies that strings have a maximum length of 255
  420. characters.
  421.  
  422. - RPN Stack
  423. Length : Variable
  424. Description:  ProCalc internally stores all its formulas in Reverse
  425. Polish Notation.  Here is a description of the RPN stack:
  426.  
  427. The first two bytes of an RPN stack store the size of the data following
  428. the first two bytes (so the total size of the stack is the value from the
  429. first two bytes + 2).  Subsequent data has a one byte header, followed by
  430. the data for that particular header.
  431.  
  432. End of RPN stack
  433. Header: 0
  434. Length: 0
  435. Description: End of RPN formula.
  436.  
  437. IEEE Number
  438. Header: 1
  439. Length: Variable.
  440. Description: There are three sections.  First is a byte, next section is
  441. an IEEE double precision real, third is a string which is the ASCII
  442. representation of the IEEE.  The first byte denotes the length of the
  443. string (NOT including the size of the IEEE real)
  444.  
  445. Cell
  446. Header: 2
  447. Length: 4
  448. Description: Bytes 0-1: the row of the cell
  449.              Bytes 2-3: the column of the cell
  450.  
  451. Range
  452. Header: 3
  453. Length: 8
  454. Description: Bytes 0-1: row1 of the range
  455.              Bytes 2-3: column1 of the cell
  456.              Bytes 4-5: row2 of the range
  457.              Bytes 6-7: column2 of the cell
  458.  
  459. String
  460. Header: 4
  461. Length: Variable
  462. Description: Same format as the String Pointer.
  463.  
  464. Operator
  465. Header: 5
  466. Length: 2
  467. Description: First BYTE is the operator number.
  468.              Second BYTE is the number of parameters for the operator.
  469. NOTE: The second BYTE is only defined if the function accepts a variable
  470. number of parameters (which ProCalc manual describes as a List).
  471. List of formulas and their operator numbers will be given later.
  472.  
  473. User Cell
  474. Header: 6
  475. Length: Variable
  476. Description: String Pointer.  Stores the name of a user defined cell.
  477.  
  478. User Range
  479. Header: 7
  480. Length: Variable
  481. Description: String Pointer.  Stores the name of a user defined range.
  482.  
  483. User Formula
  484. Header: 8
  485. Length: Variable
  486. Description: String Pointer.  Stores the name of a user defined formula.
  487.  
  488.  
  489. Formula Numbers:
  490.  
  491.    sin  =  1
  492.    cos  =  2
  493.    tan  =  3
  494.    sinh =  4
  495.    cosh =  5
  496.    tanh =  6
  497.    acos =  7
  498.    asin =  8
  499.    atan =  9
  500.    asinh = 10
  501.    acosh = 11
  502.    atanh = 12
  503.  
  504.    abs   = 13
  505.    sign  = 14
  506.    int   = 15
  507.    sqrt  = 16
  508.  
  509.    log      = 17
  510.    ln       = 18
  511.    exp      = 19
  512.    degtorad = 20
  513.    radtodeg = 21
  514.    fac      = 22
  515.    fib      = 23
  516.  
  517.    not      = 24
  518.  
  519.    row  = 25
  520.    col  = 26
  521.  
  522.    weekday  = 27
  523.    monthday = 28
  524.    month    = 29
  525.    year     = 30
  526.  
  527.    daverage = 31
  528.    dcount   = 32
  529.    dmax     = 33
  530.    dmin     = 34
  531.    dstdev   = 35
  532.    dsum     = 36
  533.    dvar     = 37
  534.  
  535.    rand    = 38
  536.    e       = 39
  537.    pi      = 40
  538.    true    = 41
  539.    false   = 42
  540.    hour    = 43
  541.    now     = 44
  542.    sec     = 45
  543.    minutes = 46
  544.    today   = 47
  545.  
  546.    mod   = 48
  547.    round = 49
  548.    loga  = 50
  549.    pow   = 51
  550.    cell  = 52
  551.  
  552.    pmt   = 53
  553.    nper  = 54
  554.    pv    = 55
  555.    fv    = 56
  556.    if    = 57
  557.    date  = 58
  558.    time  = 59
  559.    style = 60
  560.    color = 61
  561.  
  562.    range = 62
  563.  
  564.    rate  = 63
  565.  
  566.    fvv   = 64
  567.    npv   = 65
  568.    irr   = 66
  569.  
  570.    hlook = 67
  571.    vlook = 68
  572.  
  573.    index = 69
  574.  
  575.    and   = 70
  576.    or    = 71
  577.    sum   = 72
  578.    avg   = 73
  579.    max   = 74
  580.    min   = 75
  581.    count = 76
  582.    std   = 77
  583.    var   = 78
  584.    xor   = 79
  585.  
  586.    choose = 80
  587.  
  588.    iser = 81
  589.    isnv = 82
  590.    type = 83
  591.  
  592.    lcell = 84
  593.  
  594.    lrange = 85
  595.  
  596.    setcolor = 86
  597.    setstyle = 87
  598.  
  599.    sayif   = 88
  600.    printif = 89
  601.  
  602.  
  603.    times       = 90
  604.    pluse       = 91
  605.    openparen   = 92
  606.    minus       = 93
  607.    unary minus = 94
  608.    divide      = 95
  609.  
  610.    greater          = 96
  611.    greater or equal = 97
  612.    equal            = 98
  613.    less             = 99
  614.    less or equal    = 100
  615.    not equal        = 101
  616.    power operator   = 102
  617.  
  618.   err    = 103
  619.   na     = 104
  620.  
  621.   string = 105
  622.  
  623.   cterm  = 106
  624.   lrate  = 107
  625.   sln    = 108
  626.   term   = 109
  627.  
  628.   ddb    = 110
  629.   syd    = 111
  630.  
  631.   isna     = 112
  632.   isnumber = 113
  633.   isstring = 114
  634.  
  635.   n     = 115
  636.   lcols = 116
  637.   lrows = 117
  638.   s     = 118
  639.  
  640.   clean     = 119
  641.   code      = 120
  642.   datevalue = 121
  643.   length    = 122
  644.   lower     = 123
  645.   upper     = 124
  646.   proper    = 125
  647.   timevalue = 126
  648.   trim      = 127
  649.   value     = 128
  650.  
  651.   exact     = 129
  652.  
  653.   left      = 130
  654.   repeat    = 131
  655.   right     = 132
  656.  
  657.   find  = 133
  658.  
  659.   mid   = 134
  660.  
  661.   replace = 135
  662.  
  663.   charf   = 136
  664.   lhour   = 137
  665.   lminute = 138
  666.   lsecond = 139
  667.  
  668.   linkdisk = 140;
  669.  
  670.   getcell  = 141;  (* The @() operatore *)
  671.  
  672.   rexxfun  = 142;
  673.  
  674.  
  675.  
  676. - Cell Bitset Data  (These are the proper values; v1.0 of this document was wrong)
  677.  
  678.   Bit 0  : Show number in General format
  679.   Bit 1  : Scientific
  680.   Bit 2  : Percent
  681.   Bit 3  : Currency
  682.   Bit 4  : Date
  683.   Bit 5  : Time
  684.   Bit 6  : Boolean
  685.   Bit 7  : Commas
  686.   Bit 8  : If Fixed Decimals, then set.
  687.   Bit 9  : Left Aligned
  688.   Bit 10 : Right Aligned
  689.   Bit 11 : Centered
  690.   Bit 12 : Underlined
  691.   Bit 13 : Bold
  692.   Bit 14 : Italic
  693.   Bit 15 : Set if a formula cell that returns a string.
  694.  
  695.   Bit 16 : Cell Protected (currently unused)
  696.   Bit 17 : Set if a value cell, or a formula with no errors.
  697.   Bit 18 : Set if a formula with no errors
  698.   Bit 19 : Set if cell formula does not reference any cells with greater or
  699.            equal row values.
  700.   Bit 20 : Set if cell formula does not reference any cells with greater or
  701.            equal column values.
  702. NOTE: Bit 19 or 20 are cleared if the formula accesses any of the following
  703.       functions: cell, range, rand, daverage, dcount, dmax, dmin, dstdev,
  704.                  dsum, dvar, hour, today, now, sec, minutes, today, lcell,
  705.                  lrange.
  706.   Bit 21 : Set if this is a criteria cell
  707.   Bit 22 : Set if an ARexx script is attached (path stored in the cell
  708.                                               note)
  709.   Bit 23 : Set if a Transcript extended cell note is attached (path stored
  710.                                                in the cell note)
  711.   Bit 24 : Uses Default format (currently unused)
  712.   Bit 25 : Set if Negative number uses ()
  713.   Bit 26 : reserved for internal use
  714.   Bit 27 : If a number, or a formula, and the display variable needs to
  715.            be updated (to be on the safe side, set it).
  716.   Bits 28-31: Store the number of decimal places after the decimal to
  717.               calculate to.  If Bit 28 set, add 8.  If Bit 29 set, add 1.
  718.               If Bit 30 set, add 2.  If Bit 31 set, add 4.
  719.  
  720.  
  721. - New Cell Bitset Data
  722.  
  723.   Bits 0-15 are currently reserved for future use.
  724.  
  725.  
  726. - Header ByteSet Data
  727.  
  728.   Bit 0 : Set if this row/column is to be hidden.
  729.   Bit 1 : Set if a row is to have a bold header (Currently, the only use
  730.           of this is if the row is a control point for an outline).
  731.   Bit 2 : Set if a column is to have an italic header (Currently, the only
  732.           use of this is if the column is a control point for an outline)
  733.   Bit 3 : Set if this is the control point for an outline.
  734.   Bits 4-7 are reserved for future use.
  735.  
  736.  
  737.  
  738. - Window Data
  739.  
  740.   Bit 0  : Set if to recalculate by rows, else by columns
  741.   Bit 1  : Set if to recalculate manually, else automatically.
  742.   Bit 2  : Set if to show the results of formulas, otherwise, displays
  743.            the formulas.
  744.   Bit 3  : Set if to use a hollow cell cursor, otherwise filled.
  745.   Bit 4  : To display a grid, set
  746.   Bit 5  : If Work Bench is to remain open.
  747.   Bit 6  : If set, then use narrator device to repeat what user types in.
  748.   Bit 7  : Set if want to allow ARexx commands.
  749.   Bit 8  : Cursor jumps up on return
  750.   Bit 9  : Cursor jumps down on return
  751.   Bit 10 : Cursor jumps left on return
  752.   Bit 11 : Cursor jumps right on return
  753.   Bit 12 : Set if don't want the "Do you REALLY want to do that"
  754.            requesters.
  755.   Bit 13 : Set if Control Panel is to be displayed.
  756.   Bit 14 : Reserved
  757.   Bit 15 : Reserved
  758.  
  759.  
  760.  
  761.  
  762. FAFF Conventions
  763.  
  764. - rows/cols
  765. The first row and column in a matrix is 1, NOT zero.  So, the cell A1
  766. would be referenced as 1,1; B7 as 7,2.
  767.  
  768. - IEEE
  769. Numbers in cells are stored in IEEE double precision format.  Get a book
  770. on the 68881 or 68882 if you want to see the format of this beast.
  771.  
  772. - Rules
  773. Chunks that have a fixed length MUST be of that size.  Anything else is
  774. considered INVALID.
  775.  
  776. ALL information in chunks must be present, otherwise the FAFF reader will
  777. certainly barf.  If you can't fill in ALL the data of a chunk, then don't
  778. write that chunk.
  779.  
  780. Any unauthorized additions to FAFF is considered INVALID.  Micro Systems
  781. Software decided that Analyze! would create its own formula numbers for
  782. functions that Analyze! supports, but 123 realease 1a did not.  As a
  783. result their file format can generate giberish when loaded in 123 vesion
  784. 2.0 and above.  The only information supported by the official Gold Disk
  785. FAFF reader is listed here.  If a developper wishes to add his/her own
  786. chunk, then they should write to
  787.  
  788. Michal Todorovic
  789. RE FAFF
  790. co Gold Disk
  791. PO BOX 789
  792. Streetsville, Mississauga
  793. Ontario, Canada L5M-2C2
  794.  
  795. requesting an official chunk addition.  A complete description of the
  796. data in the chunk must be provided, along with a reason why this chunk
  797. should be officially supported.  We do this only to make sure that every
  798. FAFF reader and writer are compatible.  No chunk definition will be
  799. unreasonably refused.  This document will be updated periodically as new
  800. chunks are added to the FAFF standard, or as errors are found and
  801. corrected.
  802.  
  803.  
  804.  
  805.  
  806. I hope that this information will help you understand the FAFF file
  807. format.
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.                                              Michal Todorovic
  817.                                              Author of The Advantage,
  818.                                              Office Calc, Offic Graph
  819.                                              and Professional Calc.