代码之家  ›  专栏  ›  技术社区  ›  MTT

在工作表中打印特定格式的词典

  •  0
  • MTT  · 技术社区  · 6 年前

    我已经创建了一个字典(动态),以便能够在工作表中创建自动树结构。

    我已经有字典了,我想把它按一定的版式印刷出来。 我将用一个例子来解释这一点:

    字典结构:

    {key:class containing (name, if it is active/not, a dictionary with the 
    keys of nodes inside this key)}
    

    我的例子:

    {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,{})}
    

    我想用类似的格式显示它(用VBA编写代码):

    enter image description here

    知道吗?提前谢谢!

    0 回复  |  直到 6 年前