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

Free Support Forum - aspose.com

Add mutilevel TreeView Control in worksheet


Does ASPOSE Cells for Java support Microsoft Excel’s Tree View Control as in attached sample file? I am unable to find API in aspose-cells-7.7.2.jar.

Thanks,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


Hi Rita,

Thank you for contacting Aspose support.

This is actually Grouping that you have referenced through your provided sample spreadsheet. Yes, you can achieve this with Aspose.Cells for Java. Please check the below linked technical article for your reference.

If you wish to create a multi-level grouping, that is; grouping with in grouping, all you have to do is to create a larger group lets say from row 10 to 18, and then create a small group referencing the rows between the previously assigned range, such as 12 to 16.

Please have a look at the below provide code snippet and attached resultant spreadsheet (sheet2).


//Instantiating a Workbook object
Workbook workbook = new Workbook(path);

//Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.getWorksheets().get(1);

//Accessing the cells of first worksheet
Cells cells = worksheet.getCells();

//Creating a larger group spanning between row 10 and row 18
cells.groupRows(9, 17, false);
//Creating a smaller group spanning between row 12 and row 16
cells.groupRows(11, 15, false);

//Saving the modified Excel file in default (that is Excel 2003) format
workbook.save(myDir + “output.xls”);

Thank you for the sample code and the link. It is exactly what I was looking for!


Hi Rita,

Thanks for your feedback and using Aspose.Cells.

It is good to know that the sample code and article link was helpful for you. Let us know if you encounter any other issue, we will be glad to look into it and help you further.