07.05.2014 Views

The Microsoft Excel File Format - OpenOffice.org

The Microsoft Excel File Format - OpenOffice.org

The Microsoft Excel File Format - OpenOffice.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.10 Internal and External References<br />

• External and 3D References<br />

External and 3D references are represented in a formula by the tokens tRef3d (➜3.9.15) or tArea3d (➜3.9.16). <strong>The</strong>se<br />

tokens contain an index to an EXTERNSHEET record located in the own Local Link Table and indexes to the first and<br />

last referenced sheet.<br />

For 3D references, the tokens contain a negative EXTERNSHEET index, indicating a reference into the own workbook.<br />

<strong>The</strong> absolute value is the one-based index of the EXTERNSHEET record that contains the name of the first sheet. <strong>The</strong><br />

tokens additionally contain absolute indexes of the first and last referenced sheet. <strong>The</strong>se indexes are independent of the<br />

EXTERNSHEET record list. If the referenced sheets do not exist anymore, these indexes contain the value –1 (3D<br />

reference to a deleted sheet), and an EXTERNSHEET record with the special name “” (own document) is used.<br />

Each external reference contains the positive one-based index to an EXTERNSHEET record containing the URL of the<br />

external document and the name of the sheet used. <strong>The</strong> sheet index fields of the tokens are not used.<br />

Example: A document with 7 sheets (named from “Sheet1” to “Sheet7”) contains on “Sheet1” the formulas<br />

=Sheet2!A1,<br />

=Sheet1!A1,<br />

=SUM(Sheet4:Sheet6!A1:B3),<br />

=SUM([example.xls]ExtSheet1!A1:B2) (contents: A1=1.11, B1=2.22, A2=3.33, B2=4.44),<br />

=[example.xls]ExtSheet3!A1 (contents: “ABCD”), and<br />

=Sheet8!A1.<br />

<strong>The</strong> Local Link Table of Sheet1 contains 7 EXTERNSHEET Sheet Blocks:<br />

EXTERNCOUNT Number of EXTERNSHEET records = 7<br />

EXTERNSHEET 1 Name = “Sheet2”<br />

EXTERNSHEET 2 Name = “” (own sheet, ➜2.5.9)<br />

EXTERNSHEET 3 Name = “Sheet4”<br />

EXTERNSHEET 4 Name = “Sheet6”<br />

EXTERNSHEET 5 Name = “[example.xls]ExtSheet1”<br />

XCT Number of CRN = 2<br />

CRN 0 Cell range = A1:B1, contents = 1.11, 2.22<br />

CRN 1 Cell range = A2:B2, contents = 3.33, 4.44<br />

EXTERNSHEET 6 Name = “[example.xls]ExtSheet3”<br />

XCT Number of CRN = 1<br />

CRN 0<br />

Cell range = A1, contents = “ABCD”<br />

EXTERNSHEET 7 Name = “” (own workbook, ➜2.5.9)<br />

Inside of the first formula the cell reference is represented by the token tRef3d (➜3.9.15). <strong>The</strong> third formula<br />

contains the token tArea3d (➜3.9.16). <strong>The</strong> last formula contains a tRef3d token which refers to the last<br />

EXTERNSHEET record and contains –1 as sheet indexes.<br />

101

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!