import org.apache.poi.ss.usermodel.BaseTestXCell;
import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.FormulaError;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.SXSSFITestDataProvider;
import org.apache.poi.xssf.usermodel.XSSFCell;
"\nPOI",
"\n\nPOI \n",
};
- for(String str : samplesWithSpaces){
+ for (String str : samplesWithSpaces) {
Workbook swb = _testDataProvider.createWorkbook();
Cell sCell = swb.createSheet().createRow(0).createCell(0);
sCell.setCellValue(str);
swb.close();
}
}
+
+ @Test
+ public void test62216() throws IOException {
+ try (SXSSFWorkbook wb = new SXSSFWorkbook()) {
+ Cell instance = wb.createSheet().createRow(0).createCell(0);
+ String formula = "2";
+ instance.setCellFormula(formula);
+ instance.setCellErrorValue(FormulaError.NAME.getCode());
+
+ assertEquals(formula, instance.getCellFormula());
+ }
+ }
}