The Microsoft Excel File Format - OpenOffice.org
The Microsoft Excel File Format - OpenOffice.org
The Microsoft Excel File Format - OpenOffice.org
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
4.10 Internal and External References<br />
• External Names<br />
In <strong>Excel</strong>, formulas can use defined names located in another workbook, called “external names”. <strong>The</strong> definitions for<br />
external names are stored in a combination of EXTERNSHEET Sheet Blocks and EXTERNSHEET Document Blocks.<br />
<strong>The</strong> EXTERNSHEET Sheet Blocks contain the source document and sheet names the external names are located in, and<br />
the cached cell contents. Following a single EXTERNSHEET Document Block that only contains the source document<br />
name and the external name definitions themselves. This is repeated for each external document.<br />
Inside of a formula an external name is represented by the token tNameX (➜3.9.14). It contains the one-based index to<br />
the EXTERNSHEET record (of the EXTERNSHEET Document Block) and a one-based index to an EXTERNALNAME<br />
record inside this block. Each EXTERNALNAME record refers to a preceding EXTERNSHEET record containing the<br />
sheet name.<br />
Example: A document contains the formulas<br />
=example.xls!GlobalName (location: ExtSheet3!C33; contents: 33),<br />
=[example.xls]ExtSheet3!LocalName (location: ExtSheet1!B22; contents: “ABCD”),<br />
=[example.xls]ExtSheet1!LocalName (location: ExtSheet1!A11; contents: 11), and<br />
=another_example.xls!GlobalName (location: ExtSheet2!B2; contents: 2).<br />
<strong>The</strong> Local Link Table of Sheet1 contains two EXTERNSHEET Sheet Blocks followed by an EXTERNSHEET<br />
Document Block for the document “example.xls”; and one EXTERNSHEET Sheet Block and one EXTERN-<br />
SHEET Document Block for the document “another_example.xls”:<br />
EXTERNCOUNT Number of EXTERNSHEET records = 5<br />
EXTERNSHEET 1<br />
XCT Number of CRN = 2<br />
Name = “[example.xls]ExtSheet1”<br />
CRN 0 Cell range = A11, contents = 11<br />
CRN 1<br />
EXTERNSHEET 2<br />
Cell range = B22, contents = “ABCD”<br />
XCT Number of CRN = 1<br />
Name = “[example.xls]ExtSheet3”<br />
CRN 0 Cell range = C33, contents = 33<br />
EXTERNSHEET 3<br />
EXTERNALNAME 1<br />
Name = “example.xls”<br />
Name = “GlobalName”, EXTERNSHEET = 0 (global),<br />
Formula = “=[example.xls]ExtSheet3!C33”<br />
EXTERNALNAME 2 Name = “LocalName”, EXTERNSHEET = 2,<br />
Formula = “=[example.xls]ExtSheet1!B22”<br />
EXTERNALNAME 3 Name = “LocalName”, EXTERNSHEET = 1,<br />
Formula = “=[example.xls]ExtSheet1!A11”<br />
EXTERNSHEET 4<br />
XCT Number of CRN = 1<br />
Name = “[another_example.xls]ExtSheet2”<br />
CRN 0 Cell range = B2, contents = 2<br />
EXTERNSHEET 5<br />
EXTERNALNAME 1<br />
Name = “another_example.xls”<br />
Name = “GlobalName”, EXTERNSHEET = 0 (global),<br />
Formula = “=[another_example.xls]ExtSheet2!B2”<br />
All formulas in the example above contain the token tNameXV.<br />
<strong>The</strong> tokens of the first three formulas refer to EXTERNSHEET 3 (the EXTERNSHEET Document Block of<br />
“example.xls”). Each token refers to the respective EXTERNALNAME record following this EXTERNSHEET<br />
record. For instance, the third formula refers to EXTERNALNAME 3 which contains the name “LocalName”<br />
and refers to EXTERNSHEET 1. EXTERNSHEET 1 is used to obtain the sheet name of the external name. <strong>The</strong><br />
name is completed to “[example.xls]ExtSheet1!LocalName”.<br />
<strong>The</strong> tNameXV token of the last formula refers to EXTERNSHEET 5 (the EXTERNSHEET Document Block of<br />
“another_example.xls”). Because EXTERNSHEET 5 describes a global external name, the name is directly<br />
completed to “another_example.xls!GlobalName”.<br />
103