https://bz.apache.org/bugzilla/show_bug.cgi?id=63841
--- Comment #4 from Joan <[email protected]> --- of course i can do that JavaVM is set to nl-NL import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; import org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator; import org.apache.poi.xssf.usermodel.XSSFWorkbook; public class Test { public Test(String excelFile, String outputFile) { try { Workbook wb = WorkbookFactory.create(new FileInputStream(excelFile)); for(Sheet sheet : wb) { for(Row row : sheet) { row.getCell(0).setCellValue((double)750/365); } } if (wb instanceof XSSFWorkbook) { XSSFFormulaEvaluator.evaluateAllFormulaCells(wb); }else if (wb instanceof HSSFWorkbook) { HSSFFormulaEvaluator.evaluateAllFormulaCells(wb); } FileOutputStream out = new FileOutputStream(new File(outputFile)); wb.write(out); out.close(); } catch (Exception e) { e.printStackTrace(); } } public static void main(String[] args) { Test t = new Test("testfile.xlsx","output.xlsx"); } } And "testFile.xlsx" is made as follows cell a1= 1 cell a2= 1 cell b1= =TEKST(A1;"α #,##") cell b2= =TEKST(A1;"α #.##") -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
