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

Free Support Forum - aspose.com

Format cell to Text

Hi Team,

How to set the format of cell to Text in aspose 8 with java?

Early response is appreciable.

Thnaks,

--GUM

Hi,


Please see the sample code on how to format a cell to Text format for your reference:
e.g
Sample code:

Workbook wb = new Workbook();
Worksheet sheet = wb.getWorksheets().get(0);
sheet.getCells().get(“A1”).putValue(“Data1”);
Style style = sheet.getCells().get(“A1”).getStyle();
style.setCustom("@");
sheet.getCells().get(“A1”).setStyle(style);

wb.save(“outTextformatting1.xlsx”);

Thank you.