Hi all,
Someone may have done this before or had some ideas on how to do it so thought I'd check before I dedicated time to it...
I have data in a tree and needed to convert it to a '.' separated hierarchy as below.
[TABLE="width: 280"]
<colgroup><col width="70" span="4" style="width:53pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 70"]a[/TD]
[TD="class: xl65, width: 70"] [/TD]
[TD="class: xl65, width: 70"] [/TD]
[TD="class: xl65, width: 70"]a[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]b[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]a.b[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]c[/TD]
[TD="class: xl65"]a.b.c[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]d[/TD]
[TD="class: xl65"]a.b.d[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]e[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]a.e[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]f[/TD]
[TD="class: xl65"]a.e.f[/TD]
[/TR]
[TR]
[TD="class: xl65"]g[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]g[/TD]
[/TR]
</tbody>[/TABLE]
2500 rows, ~10 columns deep. Any ideas?
Ideally it would also be possible to select to exclude one or more columns. For example, excluding the second column would generate:
[TABLE="width: 280"]
<colgroup><col width="70" span="4" style="width:53pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 70"]a[/TD]
[TD="class: xl65, width: 70"] [/TD]
[TD="class: xl65, width: 70"] [/TD]
[TD="class: xl65, width: 70"]a[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]b[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]a[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]c[/TD]
[TD="class: xl65"]a.c[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]d[/TD]
[TD="class: xl65"]a.d[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]e[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]a[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]f[/TD]
[TD="class: xl65"]a.f[/TD]
[/TR]
[TR]
[TD="class: xl65"]g[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]g[/TD]
[/TR]
</tbody>[/TABLE]
Ideally duplicate entries are left blank e.g. on the above there are three 'a' entries. Could always do a remove duplicates operation after, but it may be more efficient to do it at the time?
Someone may have done this before or had some ideas on how to do it so thought I'd check before I dedicated time to it...
I have data in a tree and needed to convert it to a '.' separated hierarchy as below.
[TABLE="width: 280"]
<colgroup><col width="70" span="4" style="width:53pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 70"]a[/TD]
[TD="class: xl65, width: 70"] [/TD]
[TD="class: xl65, width: 70"] [/TD]
[TD="class: xl65, width: 70"]a[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]b[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]a.b[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]c[/TD]
[TD="class: xl65"]a.b.c[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]d[/TD]
[TD="class: xl65"]a.b.d[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]e[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]a.e[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]f[/TD]
[TD="class: xl65"]a.e.f[/TD]
[/TR]
[TR]
[TD="class: xl65"]g[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]g[/TD]
[/TR]
</tbody>[/TABLE]
2500 rows, ~10 columns deep. Any ideas?
Ideally it would also be possible to select to exclude one or more columns. For example, excluding the second column would generate:
[TABLE="width: 280"]
<colgroup><col width="70" span="4" style="width:53pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 70"]a[/TD]
[TD="class: xl65, width: 70"] [/TD]
[TD="class: xl65, width: 70"] [/TD]
[TD="class: xl65, width: 70"]a[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]b[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]a[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]c[/TD]
[TD="class: xl65"]a.c[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]d[/TD]
[TD="class: xl65"]a.d[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]e[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]a[/TD]
[/TR]
[TR]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]f[/TD]
[TD="class: xl65"]a.f[/TD]
[/TR]
[TR]
[TD="class: xl65"]g[/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"] [/TD]
[TD="class: xl65"]g[/TD]
[/TR]
</tbody>[/TABLE]
Ideally duplicate entries are left blank e.g. on the above there are three 'a' entries. Could always do a remove duplicates operation after, but it may be more efficient to do it at the time?