workbook.xlm: worksheets, define names and relationships ======================================================== The most important thing we will find in `workbook.xml` is a list of sheets and a list of defined names For example the list of sheets might be something like: ```xml ``` The order is the order they will appear in the workbook. `sheetId` identifies the sheet and does not change if we reorder the sheets. This example has three defined names. Those that have a `localSheetId` attribute are scoped to a sheet. Note that the `localSheetId` refers to the order in the sheet list (0-indexed) and not the `sheetId`. A sheet can hve one of three states: * visible * hidden * very hidden To understand what file belongs to each sheet we have to do a bit of work. we will also understand the sheet "`Chart1`" is not a spreadsheet that we what to import but a "chart" sheet. This is where the relationships file comes in (xl/_rels/workbook.xml.rels). In our case it is something like: ```xml ``` The `r:id` attribute in the sheet list links the sheet to this relationships file. For instance the sheet "shared" has an relationships id "rIdr5" that links to the file "`worksheets/sheet4.xml`" that is of type "worksheet". Note that the second sheet "Chart" has id `rId2` that links to the file "`chartsheets/sheet1.xml`" and is of type "chartsheet". In IronCalc we ignore those sheets. ```xml shared!$G$5 Sheet1!$I$6 Second!$B$1:$B$9 Sheet1!$A$16:$A$18 Sheet1!$C$14 ``` So `answer2` is scoped to `Sheet1` and `answer` is scoped to `shared`.