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

Free Support Forum - aspose.com

Java Aspose Cells Range Style


I would like to set the range style for individual columns range

For example


B7-B30-Range 2 etc.

I am populating the the cells.importArray() for setting the columns and rows for the table data.

This will be an example

H1 H2 H3................Hn(Column Headers)

V1 V2 V3................Vn(Data Values)

I tried with named range and cells.applyrangeStyle doesn't help me out.The formats will be custom(numbers,text,datetime,date).

Could you please tell me how to achieve it.



Hi Joe,

Which version of Aspose.Cells for Java you are using. Kindly use the latest version of the product. Moreover, please use setRangeStyle() method of Cells class.

Following is my testing code and attached is the output file, it works fine (kindly check it):

Workbook workbook = new Workbook();
try {

Worksheets worksheets = workbook.getWorksheets();
//Accessing the first worksheet in the Excel file
Worksheet sheet = worksheets.getSheet(0);
Cells cells = sheet.getCells();

//Creating a named range
//NamedRange namedRange = cells.createNamedRange("Range1","A7", "A30");

//Setting the display format of the date to number 15 to show date as "d-mmm-yy"
Style style = cells.getCell(0,0).getStyle();


//Saving the modified Excel file in default format


catch (IOException e) {

Thank you.

Thanks a lot it works perfect.