So I have a flextable and I am trying to add a row. The data I want to input into the cells is located within a tree. I can't seem to find a way to bring the data over into my equation. Any help?
Here is the tree holding some sample info.
private Node root = buildTree();
private Node buildTree()
{
Node root = new Node();
root.id = "Main Component";
root.data = new String[]{ "example", "example", "example", "example", "example", "example", "example"};
Node child1 = new Node();
child1.id = "Part 1";
child1.data = new String[]{ "example", "example", "example", "example", "example", "example", "example"};
root.children.add(child1);
Node child11 = new Node();
child11.id = "Part 1-1";
child11.data = new String[]{ "example", "example", "example", "example", "example", "example", "example"};
child1.children.add(child11);
I want to be able to call addRow() to add a row to my table, I'm just stuck as to how to get the information within the arrays in the nodes.
private void addRow(Node nde)
{
//add first row of data, pull information from the tree
}
Any help is greatly appreciated