String xlsxOutputPath = String.format("%s/%s.xlsx", file.getParent(), Files.getNameWithoutExtension(file.toString()));
System.out.println(String.format("Writing %s", xlsxOutputPath));
try (
FileOutputStream out = new FileOutputStream(xlsxOutputPath);
ExcelFileFormulas excel = new ExcelFileFormulas(out)
)
{
excel.addResult(result, QUIET_LAYOUT);
} catch (FormulaParseException | IOException e) {
System.err.format("Error: could not write file '%s'\n", xlsxOutputPath);
}
}
}