title: Print a dictionary with certain format in worksheet
body: <p>I have created a dictionary (dynamic) to be able to create an automated tree structure in my worksheet.</p>
  
  <p>I already have the dictionary and I want to print it with a certain layout. 
  I will explain this with an example:</p>
  
  <p>Let's say I have the following dictionary, in which the values for every key are classes with different variables:</p>
  
  <p>Dictionary structure: </p>
  
  <pre><code>{key:class containing (name, if it is active/not, a dictionary with the 
  keys of nodes inside this key)}
  </code></pre>
  
  <p>My example: </p>
  
  <pre><code>{1:(Parent 1, Active, {2,3,4}),2:(Child 1,Active,{}),3:(Child 2,Active, 
  {}),4:(Parent 2,Active,{5}),5:(Child 3,Active,{6,7}),6:(Grandchild 
  1,Active,{}),7:(Grandchild 2,Active,{})}
  </code></pre>
  
  <p>I want to display it with a format similar to this (writing the code in VBA):</p>
  
  <p><a href="https://i.stack.imgur.com/bPuxR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bPuxR.png" alt="enter image description here"></a></p>
  
  <p>Any idea? Thanks in advance!</p>