I am currently working on creating .xlsx file using apache poi. my only issue is when I open my excel it always shows as Custom instead of Accounting. The cell formula or any integer value in cell in excel it shows as Custom instead of Accounting. my code looks good and the cell value are also coming correct as expected but in excel it shows as custom and not accounting. Is there a limitation in apache poi or I am doing something wrong. Any help will be highly appreciated.
For example I want to show this value $88645.00 in cell as Accounting instead of Custom.
Below is my sample code
Decimal2Style = oWorkbookInter.createCellStyle();
Decimal2Style.setFont(TahomaBlackFont);
Decimal2Style.setDataFormat(oWorkbookInter.createDataFormat().getFormat("$#,##0.00"));
SheetRow = null;
SheetCell = null;
SheetRow = oSheetInvoice.getRow(35);
SheetCell = SheetRow.getCell(14);
sCellFormula = "SUM(O22:O33)";
SheetCell.setCellStyle(Decimal2Style);
SheetCell.setCellFormula(sCellFormula);