I've created a piece of java code to export some data into Excel. I'm having troubles to export currency attributes. To be precise the export is working fine but I can't find a way to export currency data whitout having to convert the data into text. The result is that in Excel the values are shown as text. For example 39,00 in Mendix will be 39.0 in excel. Furthermore i can't set the celltype to currency in my java code (using mendix version 2.4.5), it's only possible to set boolean/nummeric and text. IMendixObject fileDoc = Core.create(this.getContext(), FactuurOverzicht.getType()); IExcelGrid grid = new ExcelGrid(); ... grid.getColumn(10).getCell(cellNr).setCellType(CellType.NUMERIC); grid.getColumn(10).getCell(cellNr).setContent(formatData(order.getTotaalPrijs())) The function formatDate is my own function and convert the double value into a string. And it prevents the null pointer exception. The only solution i can think of is the use of a different (open-source) library. Or am i missing something.
Now i'm trying to use the poi library. Like the following example... the lib is also installed with mendix.
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("Facturatie");