home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / APPS / BUSINESS / WKSFFMT.ZIP / WSFF1.TXT next >
Encoding:
Text File  |  1990-06-27  |  14.1 KB  |  303 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                             WORKSHEET FILE FORMAT 
  15.                                   FROM LOTUS 
  16.  
  17.                        INTRODUCTION AND QUICK REFERENCE
  18.  
  19.                Copyright(c) 1984, Lotus Development Corporation 
  20.                                161 First Street 
  21.                         Cambridge, Massachusetts 02142 
  22.                                 (617) 492-7171 
  23.                       Electronic Edition, December, 1984 
  24.                              All Rights Reserved 
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  PREFACE 
  32.  
  33.  Lotus Development Corporation's 1-2-3(TM) and Symphony(TM) perform user
  34.  selected operations upon a data matrix that is termed a "worksheet". 
  35.  
  36.  Worksheet files are such matrices stored on disk. 
  37.  
  38.  A worksheet file is an unbroken sequence of binary coded records defining a
  39.  single worksheet. 
  40.  
  41.  Both 1-2-3 and Symphony accept externally created data files if the files
  42.  are in the worksheet file format.  Other programs can decode and process
  43.  worksheet files created by 1-2-3 or Symphony. 
  44.  
  45.  The following document provides information required to create or access a
  46.  worksheet file by describing the records used to create a worksheet file.
  47.  It is assumed that the reader is familiar with Lotus products and has ready
  48.  access to 1-2-3 or Symphony documentation. 
  49.  
  50.  Note that the worksheet files for 1-2-3 and Symphony are similar, but not
  51.  necessarily interchangeable.  1-2-3 and Symphony share some record types,
  52.  but also have record types unique to that product.  Symphony can read 1-2-3
  53.  records, but 1-2-3 cannot read Symphony records. 
  54.  
  55.  The information contained in this document has been released into the
  56.  public domain and is not considered to be confidential or proprietary
  57.  although still the copyright and property of Lotus Development Corporation.
  58.  All efforts have been made to ensure that this information is clear and
  59.  useful since Lotus will not be providing customer assistance with this
  60.  booklet.  Lotus will, however, incorporate any necessary corrections if
  61.  they are reported in writing to: 
  62.  
  63.                         Lotus Development Corporation 
  64.                         Worksheet File Format 
  65.                         161 First Street 
  66.                         Cambridge, MA 02142 
  67.  
  68.  
  69.  
  70.  
  71.  WORKSHEET FILE FORMAT 
  72.  
  73.  Worksheet files are organized as an unbroken sequence of variable length
  74.  binary records.  Each record consists of a 4-byte header followed by the
  75.  record body. The header defines the record's type and length, as the
  76.  example below shows.
  77.   
  78.  The header's composition is as follows: 
  79.  
  80.  
  81.  
  82.  Byte Number               Byte Description 
  83.  0,1                       Record type code 
  84.  2,3                       Record body length (bytes) 
  85.  
  86.  
  87.  Example: Record Header 
  88.  
  89.                                Record Header 
  90.  
  91.                            Record         Record 
  92.                             Type          Length 
  93.  
  94.           Byte Number      0    1         2    3 
  95.              Hex Code     1C   00        20   00 
  96.    Decimal Equivalent       28             32 
  97.  
  98.  
  99.  The record body can be of many different types; most have predetermined
  100.  length, but some vary in length. 
  101.  
  102.  The record type code is 28. 
  103.  
  104.  In a hex dump of the file, the record type appears as 1C 00h, noting that
  105.  the 8086/88 stores the most significant byte of word in the higher memory
  106.  address. 
  107.  
  108.  The record length is 32 bytes. 
  109.  In a hex dump of the file, the record length appears as 20 00h. 
  110.  
  111.  
  112.  Record types with Column/Row Coordinates 
  113.  
  114.  Some record types contain column/row coordinates to identify a cell, or one
  115.  of the two points that define a range.  Numbering starts at zero in the
  116.  upper left corner of the worksheet. 
  117.  For example: 
  118.  
  119.                              Cell A1 = column 0, row 0 
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  SUMMARY OF RECORD TYPES 
  132.  
  133.  This section describes the different record types found in 1-2-3 and
  134.  Symphony. 
  135.  
  136.  There are to Quick Reference tables ordered by Opcode and by Product,
  137.  followed by a detailed reference section ordered by Opcode.  In the
  138.  reference section, there are examples for the more commonly used records. 
  139.  
  140.  It is assumed that the reader is familiar with 1-2-3 or Symphony and has
  141.  access to Lotus' documentation. 
  142.  
  143.  Quick Reference by Opcode 
  144.  
  145.  Type       Code (hex)        Length (bytes)         Description 
  146.  
  147.  BOF            0                2                   Beginning of file 
  148.  EOF            1                0                   End of file 
  149.  CALCMODE       2                1                   Calculation mode 
  150.  CALCORDER      3                1                   Calculation order 
  151.  SPLIT          4                1                   Split window type 
  152.  SYNC           5                1                   Split window sync 
  153.  RANGE          6                8                   Active worksheet range 
  154.  WINDOW1        7                31                  Window 1 record 
  155.  COLW1          8                3                   Column width, 
  156.                                                        window 1 
  157.  WINTWO         9                31                  Window 2 record 
  158.  COLW2          A                3                   Column width, 
  159.                                                        window 2 
  160.  NAME           B                24                  Named range 
  161.  BLANK          C                5                   Blank cell 
  162.  INTEGER        D                7                   Integer number cell 
  163.  NUMBER         E                13                  Floating point number 
  164.  LABEL          F                variable            Label cell 
  165.  FORMULA        10               variable            Formula cell 
  166.  TABLE          18               25                  Data table range 
  167.  ORANGE         19               25                  Query range 
  168.  PRANGE         1A               8                   Print range 
  169.  SRANGE         1B               8                   Sort range 
  170.  FRANGE         1C               8                   Fill range 
  171.  KRANGE1        1D               9                   Primary sort key range 
  172.  HRANGE         20               16                  Distribution range 
  173.  KRANGE2        23               9                   Secondary sort key 
  174.                                                        range 
  175.  PROTEC         24               1                   Global protection 
  176.  FOOTER         25               242                 Print footer 
  177.  HEADER         26               242                 Print header 
  178.  SETUP          27               40                  Print setup 
  179.  MARGINS        28               10                  Print margins code 
  180.  
  181.  Quick Reference by Opcode (continued) 
  182.  
  183.  Type         code (hex)       Length (bytes)        Description 
  184.  
  185.  LABELFMT        29                  1               Label alignment 
  186.  TITLES          2A                  16              Print borders 
  187.  GRAPH           2D                  437             Current graph settings 
  188.  NGRAPH          2E                  453             Named graph settings 
  189.  CALCCOUNT       2F                  1               Iteration count 
  190.  UNFORMATTED     30                  1               Formatted/unformatted 
  191.                                                        print 
  192.  CURSORW12       31                  1               Cursor location 
  193.  WINDOW          32                  144             Symphony window 
  194.                                                        settings 
  195.  STRING          33                  variable        Value of string  
  196.                                                        formula 
  197.  PASSWORD        37                  4               File lockout (CHKSUM) 
  198.  LOCKED          38                  1               Lock flag 
  199.  QUERY           3C                  127             Symphony query 
  200.                                                        settings 
  201.  QUERYNAME       3D                  16              Query name 
  202.  PRINT           3E                  679             Symphony print record 
  203.  PRINTNAME       3F                  16              Print record name 
  204.  GRAPH2          40                  499             Symphony graph 
  205.                                                        record 
  206.  GRAPHNAME       41                  16              Graph record name 
  207.  ZOOM            42                  9               Orig coordinates 
  208.                                                        expanded window 
  209.  SYMSPLIT        43                  2               Nos. of split windows 
  210.  NSROWS          44                  2               Nos. of screen rows 
  211.  NSCOLS          45                  2               Nos. of screen columns 
  212.  RULER           46                  25              Named ruler range 
  213.  NNAME           47                  25              Named sheet range 
  214.  ACOMM           48                  65              Autoload.comm code 
  215.  AMACRO          49                  8               Autoexecute macro 
  216.                                                        address 
  217.  PARSE           4A                  16              Query parse 
  218.                                                        information 
  219.  
  220.  
  221.  Quick Reference by Product: 1-2-3 only
  222.  
  223.  Type          Code (hex)         Length (bytes)     Description 
  224.  
  225.  SPLIT            4                    1             Split window type 
  226.  SYNC             5                    1             Split window sync 
  227.  WINDOW 1         7                    31            Window 1 record 
  228.  WINTWO           9                    31            Window 2 record 
  229.  COLW2            A                    3             Column width,  
  230.                                                        window 2 
  231.  NAME             B                    24            Named range 
  232.  QRANGE           19                   25            Query range 
  233.  PRANGE           1A                   8             Print range 
  234.  SRANGE           1B                   8             Sort range 
  235.  KRANGE1          1D                   9             Primary sort key range 
  236.  KRANGE2          23                   9             Secondary sort key 
  237.                                                        range 
  238.  FOOTER           25                   242           Print footer 
  239.  HEADER           26                   242           Print header 
  240.  SETUP            27                   40            Print setup 
  241.  MARGINS          28                   10            Print margins code 
  242.  TITLES           2A                   16            Print borders 
  243.  GRAPH            2D                   437           Current graph settings 
  244.  NGRAPH           2E                   453           Named graph settings 
  245.  
  246.  Quick Reference by Product: 1-2-3 and Symphony
  247.  
  248.  Type          Code (hex)         Length (bytes)     Description 
  249.  
  250.  BOF               0                   2             Beginning of file 
  251.  EOF               1                   0             End of file 
  252.  CALCMODE          2                   1             Calculation mode 
  253.  CALCORDER         3                   1             Calculation order 
  254.  RANGE             6                   8             Active worksheet range 
  255.  COLW1             8                   3             Column width 
  256.  BLANK             C                   5             Blank cell 
  257.  INTEGER           D                   7             Integer number cell 
  258.  NUMBER            E                   13            Floating point number 
  259.  LABEL             F                   variable      Label cell 
  260.  FORMULA           10                  variable      Formula cell 
  261.  TABLE             18                  25            Data table range 
  262.  FRANGE            1C                  8             Fill range 
  263.  HRANGE            20                  16            Distribution range 
  264.  PROTEC            24                  1             Global protection 
  265.  LABELFMT          29                  1             Label alignment 
  266.  CALCCOUNT         2F                  1             Iteration count 
  267.  UNFORMATTED       30                  1             Formatted/unformatted 
  268.                                                        print 
  269.  CURSORW12         31                  1             Cursor location 
  270.  
  271.  
  272.  Quick Reference by Product: Symphony only
  273.  
  274.  Type          Code (hex)        Length (bytes)      Description 
  275.  
  276.  WINDOW           32                 144             Symphony window 
  277.                                                        settings 
  278.  STRING           33                 variable        Value of string 
  279.                                                        formula 
  280.  PASSWORD         37                 4               File lockout (CHKSUM) 
  281.  LOCKED           38                 1               Lock flag 
  282.  QUERY            3C                 127             Symphony query 
  283.                                                        settings 
  284.  QUERYNAME        3D                 16              Query name 
  285.  PRINT            3E                 679             Symphony print record 
  286.  PRINTNAME        3F                 16              Print record name 
  287.  GRAPH2           40                 499             Symphony graph 
  288.                                                        record 
  289.  GRAPHNAME        41                 16              Graph rocord name 
  290.  ZOOM             42                 9               Orig coordinates 
  291.                                                        expanded window 
  292.  SYMSPLIT         43                 2               Nos. of split windows 
  293.  NSROWS           44                 2               Nos. of screen rows 
  294.  NSCOLS           45                 2               Nos. of screen columns 
  295.  RULER            46                 25              Named ruler range 
  296.  NNAME            47                 25              Named sheet range 
  297.  ACOMM            48                 65              Autoload. comm code 
  298.  AMACRO           49                 8               Autoexecute macro 
  299.                                                        address  
  300.  PARSE            4A                 16              Query parse 
  301.                                                        information 
  302. 
  303.