The numbers with 0 precedences, zeros are being ignored by in cell content.
How to allow numbers with zero precendences in excel using aspose cells for java.
This is MS Excel’s default behavior and not an issue, MS Excel omits zeros decimal places. You may cope with it by applying proper (custom) numbers formatting to your cells (range of cells). See the sample code segment for your reference:
e.g.
Sample code:
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.getWorksheets().get(0);
Cells cells = worksheet.getCells();
cells.get("A2").putValue(10.0034);
cells.get("A3").putValue(11.1456);
cells.get("C4").putValue(14.0006);
cells.get("C5").putValue(15.0634);
//Create a style object
Style style = workbook.createStyle();
style.setCustom("0.00");
//Create styleflag object
StyleFlag styleFlag = new StyleFlag();
styleFlag.setNumberFormat(true);
//Create your desired range and apply style to it
Range range = worksheet.getCells().createRange("A2:C5");
range.applyStyle(style, styleFlag);
workbook.save("f:\\files\\out1.xlsx");
Hope, this helps a bit.