Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-687

Formula that refer to a NameRange does not update contents correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.5.0
    • 3.5.0 RC
    • ZSS Formula
    • None

      SBook book = SBooks.createBook("book1");
      book.getBookSeries().setAutoFormulaCacheClean(true);
      SSheet sheet1 = book.createSheet("SheetX");

      SName name = book.createName("FOO");
      name.setRefersToFormula("SheetX!A1:B2");

      // test insert/delete cells
      sheet1.getCell("A1").setValue(1);
      sheet1.getCell("B1").setValue(2);
      sheet1.getCell("A2").setValue(3);
      sheet1.getCell("B2").setValue(4);

      Assert.assertEquals("SheetX!A1:B2", name.getRefersToFormula());
      Assert.assertEquals(10D, sheet1.getCell("D2").getValue());

      // insert B1:B1
      sheet1.insertCell(0, 1, 0, 1, true);
      Assert.assertEquals("SheetX!A1:B2", name.getRefersToFormula());
      Assert.assertEquals(8D, sheet1.getCell("D2").getValue());

            dennis dennis
            henrichen henrichen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: