i have a question on something my users would like. they would like a “Parent-Child” hierarchical report that shows the cascading relationships of parts to each other. they would like this delievered to them in Excel, using exandable/collaspable rows (excel grouping via plus/minus buttons).
using Oracle, i have created an ordered resultset, making use of its built-in “CONNECT BY PRIOR a.PartID = a.ParentID” clause. works well, and provides me an ordered set of rows that looks like this:
…it also provides to me a “LEVEL” column that indicates the nested depth of the current row – “1” is a Part, “2” is a Child, “3” is a Grandchild, etc… a simplified version looks like so:
LEVEL PARTID NAME DESCRIPTION PARENTID
1 000001 test3 no parent
2 000002 test4 parent is test3 000001
now my question – using Cells, how can i create the expanding/collasping excel document? i see you have methods such as:
GroupRows(iStart, iEnd, bHidden)
…which is great for manually doing it. but is there a technique for automating this?
Thanks for considering Aspose.
Well, Normally we follow MS Excel standards. I think you may utilize Cells.GroupRows /GroupColumns methods to make a heirachical spreadsheet and mimic your sample. But this technique is manual as you may check in MS Excel too.
But if you want this for web presentation purpose, you may use our Aspose.Grid.Web control, please check the related demos: http://www.aspose.com/Products/Aspose.Grid/Demos/DataBind/ExpandChildView.aspx
Well, Normally we follow MS Excel standards.
what do you mean by that?
> But this technique is manual as you may check in MS Excel too.
not sure what you mean by this?
> But if you want this for web presentation purpose, you may use our Aspose.Grid.Web control
…it might be used for presentation, but our users prefer Excel as their report platform.
if it were going to use Aspose.Grid… i see one can setup multiple tables and create a relationship for them. but what about when there is only one table, w/ a self-referential ID, such as in my example data? that is, each row has a column that states whether it has a parentID, and what that ID is if it does. (this type of data & query is common in, say, HR databases…where theres only one table of all employees, and the hierarchy is represented by a ManagerID column that represents the unique ID of another row in the employee table, etc…)
Aspose.Cells is a spreadsheet engine. So if you can create a file manually in MS Excel, Aspose.Cells can do it.
For your case, Aspose.Cells allows you to create reports according to your need but you have to use you own code to manage data and relationship.
> Aspose.Cells allows you
to create reports according to your need but you have to use you
code to manage data and relationship.
i see. well if i may, it sure would be a sweet feather in the cap of Cells if it could do this sort of relationship management for me. Telerik has a tree-control that does just that – you give it the dataset, then tell it the relationship, and voilla, it builds the tree.
i realize that probably wasnt one of the things you had in mind when building Cells… but believe it or not, Excel is the preferred report delivery format for all of the engineers at our major oil & gas company. they dont like web reports, they like Excel. being able to deliver an exapanding/collasping hierarhical report in Excel would be a very nice feature indeed.
Thanks for considering Aspose.
Aspose.Cells is not a control rather a spreadheet generation and management library which has his own formula calculation engine, formatting ingrediences and other features same like MS Excel provide. We always try to implement all those features which MS Excel provides. For this feature, I think MS Excel don't provide this feasibility to directly generate a heirachical report. Still we will check if we can implement this feature.