Uploaded image for project: 'OASIS Open Document Format for Office Applications (OpenDocument) TC'
  1. OASIS Open Document Format for Office Applications (OpenDocument) TC
  2. OFFICE-2586

SHEET / SHEETS function (5.13.32) cannot be fully implemented as written

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: ODF 1.2 Part 2 CD 1
    • Fix Version/s: ODF 1.2 Part 2 CD 2
    • Component/s: OpenFormula
    • Labels:
      None
    • Proposal:
      Hide

      For 5.13.31 SHEET:

      Add
      Constraint: R must not contain a Source location, see 4.8 References.

      In Semantics:

      Change
      Returns the sheet number of ...
      to
      Returns the 1 based sheet number of ...

      Add:
      Hidden sheets are not excluded.

      After "If a reference is given it is not dereferenced." add
      If a reference does not contain a sheet reference, the result is the sheet number of the sheet containing the formula.

      For 5.13.32 SHEETS:

      Add
      Constraint: R must not contain a Source location, see 4.8 References.

      Add to Semantics:
      Hidden sheets are not excluded.

      Show
      For 5.13.31 SHEET: Add Constraint: R must not contain a Source location, see 4.8 References. In Semantics: Change Returns the sheet number of ... to Returns the 1 based sheet number of ... Add: Hidden sheets are not excluded. After "If a reference is given it is not dereferenced." add If a reference does not contain a sheet reference, the result is the sheet number of the sheet containing the formula. For 5.13.32 SHEETS: Add Constraint: R must not contain a Source location, see 4.8 References. Add to Semantics: Hidden sheets are not excluded.

      Description

      There are a number of details that are not specified in the function definition for SHEETS. They are:

      1. Handling of hidden and very hidden sheets.
      a. Are they included in the total returned by SHEETS()? Can they be found by SHEET("SheetName")? What about references to them (these still evaluate correctly)
      b. If we start with Sheet1, Sheet2, and Sheet3 and hide Sheet2 what should SHEET("Sheet3") return? Visibly it's the second sheet, but internally it's the third.
      c. Is there a distinction between handling of hidden vs. very hidden sheets
      2. We need to make sure we are talking about the tab order and not some other order. Also should the index be 0 or 1 based (I suspect 1 based, but we should make sure)
      3. What about something like SHEET(Sheet1!A1:Sheet2!B2). Is this an error? Do we return the position of the first sheet? The last sheet?
      4. What happens with cases where formula evaluation is handed off across sheets?
      For example, In sheet1: =Sheet2!foo, where Sheet2!foo is defined as =SHEET(!B2). The top-level formula is on Sheet1, but foo is on Sheet2, but !B2 evaluates to a cell on Sheet1.
      5. What if you're calling a macro function on a cell in a normal worksheet and the macro function calls SHEET – which sheet do we return?
      6. When specifying a sheet by name can a user enter something like "[Book1.xlsx]Sheet1",
      a. What do we do with a ref that refers to an external book?
      7. If sheet "foo" exists in Book1 and Book2, but not in Book3 and Book3 calls SHEET("foo") what should we return? Do we error? Should it be the tab position from Book1 or Book2? Is there a defined mechanism for picking which external book we pull from? Is it required that this be deterministic (i.e. can we just use some arbitrary internal order and grab the first match we find?).

        Attachments

          Activity

            People

            • Assignee:
              erack Eike Rathke (Inactive)
              Reporter:
              ericpa Eric Patterson
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: