public void Test57165() { XSSFWorkbook wb = XSSFTestDataSamples.OpenSampleWorkbook("57171_57163_57165.xlsx"); try { RemoveAllSheetsBut(3, wb); wb.CloneSheet(0); // Throws exception here wb.SetSheetName(1, "New Sheet"); //saveWorkbook(wb, fileName); XSSFWorkbook wbBack = XSSFTestDataSamples.WriteOutAndReadBack(wb) as XSSFWorkbook; try { } finally { wbBack.Close(); } } finally { wb.Close(); } }
public void TestBug54399() { XSSFWorkbook workbook = XSSFTestDataSamples.OpenSampleWorkbook("54399.xlsx"); for (int i = 0; i < workbook.NumberOfSheets; i++) { //System.out.println("i:" + i); workbook.SetSheetName(i, "SheetRenamed" + (i + 1)); } workbook.Close(); }
public void Bug57642() { XSSFWorkbook wb = new XSSFWorkbook(); XSSFSheet s = wb.CreateSheet("TestSheet") as XSSFSheet; XSSFCell c = s.CreateRow(0).CreateCell(0) as XSSFCell; c.CellFormula = (/*setter*/"ISERROR(TestSheet!A1)"); c = s.CreateRow(1).CreateCell(1) as XSSFCell; c.CellFormula = (/*setter*/"ISERROR(B2)"); wb.SetSheetName(0, "CSN"); c = s.GetRow(0).GetCell(0) as XSSFCell; Assert.AreEqual("ISERROR(CSN!A1)", c.CellFormula); c = s.GetRow(1).GetCell(1) as XSSFCell; Assert.AreEqual("ISERROR(B2)", c.CellFormula); }