/*------------------------------------------------------------------- sylksum.doc Author: MCK, Microsoft. Purpose: Summary of all currently used sylk fields. Emphasis on fields relavent to Mac Plan and Excel. Feature: Add at least a list of other SYLK records and field used by other products (need not explain semantics - just to avoid ambiguous usage). Reference: See Draft Proposed American National Standard Videotex/ Teletext Presentation Level Protocol Syntax for full ISO escape documentation. History: Date By Modification ------------------------------------------------------------ 10/31/86 MCK Added character quoting section. 9/27/85 MCK Added ISO sections and misc clean ups. -------------------------------------------------------------------*/ - Note that Mac Plan allocates a 350 character buffer for holding input lines. - Common FTD's: - ;U: Reserved for future use. - ;V: Reserved for future use. - ;X col: (diff) Column of cell. - ;Y row: (diff) Row of cell. - ;Z: Reserved for future use. - ID record: File type and creator (first record). - ;P prog: Producing program; e.g., MP, MC, MF, XL. - ;N: File uses ;N style cell protection (not ;P style). * - ;E: NE records are redundant as formulas support external ref's * directly. - B record: Sheet bounds at current cell (should be before C and F records for optimal usage). - C record: Cell definition. - ;E exp: Expression for cell. - ;K value: Value of the cell. - ;C col: (diff) Cell reference. - ;R row: (diff) Row reference. - ;G: Defines shared value (may not have an ;E for this record). - ;D: Defines shared expression. - ;S: Shared expression/value given at row ;R, col ;C. C record for ;R, ;C must precede this one. Note that no ;E or ;K fields are written here (not allowed on Excel macro sheets). - ;N: Cell NOT protected/locked (if ;N present in ;ID record). - ;P: Cell protected/locked (if ;N not present in ;ID record). Note if this occurs for any cell, we protect the entire sheet. * - ;H: Cell hidden. * - ;M exp: Expression stored with UL corner of matrix (;R ;C defines * the lower right corner). If the ;M field is supported, the * ;K record is ignored. Note that no ;E field is written. * - ;Tref,ref: UL corner of table (;R ;C defines the lower left * corner). Note that the defined rectangle is the INSIDE of * the table only. Formulas and input cells are above and to * the left of this rectangle. The row and column input cells * are given in by the two refs (possibly only one). Note that * Excel's input refs are single cells only. * - ;I: Inside a matrix or table (at row ;R, col ;C) C record for UL * corner must precede this record. Note that any ;K field is * ignored if the ;I field is supported. No ;E field is written * out. *- P record: Picture format (precedes all F records). * - ;P picture: Excel style picture format. - F record: Formats. - ;C col: Whole column format. - ;R row: Whole row format. - ;F ch1 digs ch2: Single cell format. ch1: Number format: DCEFG$*% - default, currency (extended), exponent, fixed, general, dollar, graph, percent. Note that Plan does not read currency (converts to general). digs: Number of digits. ch2: Alignment: DCGLR-X - Default, center, standard, left, right, ignored, fill. Fill is for Excel style alcFill. Note that Mac Plan 1.XX screws up on '-' formats and alignments. Also, very few early versions (1.0, 1.01) mess up on 'C' format. - ;D ch1 digs ch2 width: Default format. Like ;F but ch's can't be 'D'. width: Default column width. Note that for Excel, this record should precede the B record to ensure all cells without explicit formats get set to the default. - ;E: Show formulas (sheet wide). - ;K: Show commas (sheet wide). - ;W: n1 n2 n3: Column widths (first col, last col, width). * - ;N fontid size: Font to use (sheet wide). * - ;P index: Excel picture (based on order of FP records - 0 based). * - ;S[IDTLBR]: Style: Italic, bolD, gridlines Top, Left, Bottom, * Right. * - ;H: Don't show row/column headers (sheet wide). * - ;G: Don't show default gridlines. - NU record: File name substitution (not supported on Mac) (precedes all NE). - ;L filename: Old file name. - ;F filename: New file name. - NN record: Names (most efficient if NN appears before name use). - ;N name: The name string. - ;E exp: Expression desribing the value of the name. * - ;G ch1 ch2: Runable name (macro) with command key alias (Mac uses * only first character). * - ;K ch1 ch2: Ordinary name with unused command aliases (Plan * 2.0). * - ;F: Usable as a function. - O record: Global options. * - ;A cIter numDelta: Iteration on. The parameters are not used by * plan but are for Excel. - ;C: Completion test at current cell. - ;P: Sheet is protected (but no password). * - ;L: Use A1 mode references (R1C1 always used in SYLK file expressions). * - ;M: Manual recalc. * - ;R: Precision as formated (!fPrec). * - ;E: Macro (executable) sheet. Note that this should appear * before the first occurance of ;G or ;F field in an NN record * (otherwise not enabled in Excel). Also before first C record * which uses a macro-only function. - NE record: External link (ignored if ;E present in ID record). - ;E exp: Taget area on current sheet. - ;F filename: Source document. - ;S exp: Source area on external sheet. - W record: Window record. - ;R n1 n2 ... n14: (Mac Plan only) n1..n8: Title freeze info. n9..n12: Scroll bar info. n13..n14: Split bar info. - ;A row col: UL window corner (character based - only). - ;B: Window is bordered (character based - only). - ;N n: Window index (character based - only). - ;S ...: Window split (character based - only). - ;C n1 n2 n3: Foreground, background and border colors (IBM). - NL Record: Chart external link. - ;C n: Destination series index. - ;D exp: Name or ref for dependent variable source area. - ;E[RC] n: Relative row of column from a dependent name. - ;I exp: Name or ref for independent variable source area. - ;J[RC] n: Relative row of column from a independent name. - ;F filename: Source area. - E record: End of file (last record). ISO characters Note that all non-printing ASCII characters must be (conceptually) filtered before writting to SYLK and before reading the SYLK line. This filtering converts both the local machine character set characters into the corresponding ISO standard escape sequences. Those non-printing characters not supported in the standard use an "ASCII escape" mechanism. ISO escape codes: All supported ISO sequences begin with "N". For accented characters, this is followed by the accent designator (e.g., the umlaut designator), followed by the "base character" - that character to be accented. Note that all of the accent designators are in the range $40..$4F. Non-accented characters supported by ISO are sent as "N" followed by a single special designator in the range $21..$3F, and $50..$7E. It is recommended that as many characters as possible be encoded using ISO sequences (rather than the "raw" ASCII escapes, below) as this allows for maximum portability of you SYLK file. When reading an unrealizable ISO accented escape, just the last character of the sequence should be used (yielding at least a recognizable string). The same can be done for the "random" escapes, but this is not always guaranteed to produce a "nice" result. ASCII escapes: Characters not covered (or supported) under ISO can be encoded using a special 3-character ASCII escape sequence: " $2M $3N", where the local character encoding is $MN, hex. Semi-colon Quoting There are a couple of places in SYLK files where characters need to be quoted. Most obviously, anywhere a ";" appears that is not to be interpreted as as SYLK field seperator it must be quoted. This is done by doubling the character: ";;". Picture Character Quoting A more specialized quoting is used in the P record (formatting pictures). This is documented in the Excel manual. Basically any non-special literal character must be quoted by a backslash (\). Quotes (") can also be used to quote a sequence of such characters. Note that normally, Excel only displays quoting for non-special literal characters ($, :, -, /). But in SYLK we quote ALL literal characters. The reason all are quoted is for international considerations. Not all countries share the same set of special literal and functional (h, m, s, d, y) characters. If we did not quote all literals in SYLK, then they might be confused with US functional characters. We could have just quoted those that conflicted with the US functional set, but this is both more complicated and still ignores problems with future extensions to the functional characters. Also note that for any unrecognized unquoted characters, we just assume it is a literal (rather than give a SYLK read error). Exception: Excel 1.0 doesn't address these problems. Literals are not all quoted on writing a SYLK file and unrecognized characters in a picture cause a failure on load. __END__