Skip to content

Removing Sheet Errors With Vertex for address missing in AddressMapping #1121

Closed

Description

@BrianHung

Description

Running into a bug where when removing a sheet, it runs into a self-circular dependency bug trying to delete cell values that reference itself. Workaround has been to clear sheet before removing.

Demo

https://codesandbox.io/s/small-thunder-4j9w0m?file=/src/hyperformulaConfig.js

Activity

  1. added
    Bug
    on Dec 12, 2022
  2. sequba commented on Dec 15, 2022

    @sequba
    Contributor

    @BrianHung, thank you for reporting this bug. Please, check the demo. It does not demonstrate the described issue (there is no removeSheet call). You might have posted the wrong link by mistake.

  3. BrianHung commented on Dec 15, 2022

    @BrianHung
    ContributorAuthor

    Oops, it must've not saved: https://codesandbox.io/s/billowing-monad-obgxg9?file=/src/hyperformulaConfig.js

    import HyperFormula from "hyperformula";
    
    // Create an empty HyperFormula instance.
    const hf = HyperFormula.buildEmpty({
      precisionRounding: 10,
      licenseKey: "gpl-v3"
    });
    
    // Add a new sheet and get its id.
    const table1 = hf.addSheet("table1");
    const sheet1 = hf.getSheetId(table1);
    
    // Fill the HyperFormula sheet with data.
    hf.setCellContents(
      {
        row: 0,
        col: 0,
        sheet: sheet1
      },
      [["1/5/22", "4/13/22", "=B1-A1"]]
    );
    
    console.log(sheet1);
    
    // hf.clearSheet(sheet1);
    hf.removeSheet(sheet1);

    @sequba

  4. changed the title [-]Removing Sheet With Custom Date Parser Errors With Vertex for address missing in AddressMapping[/-] [+]Removing Sheet Errors With Vertex for address missing in AddressMapping[/+] on Dec 15, 2022
  5. sequba commented on Dec 21, 2022

    @sequba
    Contributor

    @BrianHung thanks for the demo. It is a bug, and it will be fixed in one of the upcoming releases.

    Temporary workaround: Call clearSheet() before removeSheet():

    hf.clearSheet(sheetId);
    hf.removeSheet(sheetId);

    Might be related to #855

  6. self-assigned this
    on Dec 21, 2022
  7. linked a pull request that will close this issueClear sheet before removing #1160on Feb 16, 2023
  8. sequba commented on Mar 3, 2023

    @sequba
    Contributor

    @BrianHung ,

    I'm more than happy to announce that we just released HyperFormula 2.3.1 where this issue is fixed. We are closing this issue as solved. If there is anything that won't work for you after updating, please leave a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugImpact: Medium

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions