We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Apply percentage number format to worksheet cells in Java

I checked the doc style - Aspose.Cells for Java - API Reference
and I didn’t find the support for the format like “0.0%” or “0.000%”


These are some selected (built-in) pattern supported when you use Style.setNumber() method. For your needs, you may use Style.setCustom() method to implement your desired formats (“0.0%” or “0.000%”). See the sample code segment for your reference.
Sample code:

Workbook workbook = new Workbook();
Worksheet worksheet = workbook.getWorksheets().get(0);
Cell cell = worksheet.getCells().get("A1");
Style style = cell.getStyle();

Hope, this helps a bit.

it works.thank you for your quick reply.


You are welcome and good to know that your issue is sorted out by the suggested code segment. In the event of further queries or issue, feel free to write us back.