subhojyoti
New Member
- Joined
- Nov 12, 2018
- Messages
- 3
Hi,
I'm new to Excel Scripting.
I need help to create below parent child relationship in excel. I have the source file in below format.
[TABLE="width: 480"]
<colgroup><col span="4"></colgroup><tbody>[TR]
[TD]Level1 [/TD]
[TD]Level2[/TD]
[TD]Level3[/TD]
[TD]Level4[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]009[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]010[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]011[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]012[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]013[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]014[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]015[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]072[/TD]
[/TR]
</tbody>[/TABLE]
And my output needs to be like this
[TABLE="width: 240"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Parent[/TD]
[TD]Child[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[/TR]
[TR]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]009[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]010[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]011[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]012[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]013[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]014[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]015[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]072[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 179"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]
Any help is appreciated. The number of rows will be dynamic but column can remain the same.[/TD]
[/TR]
</tbody>[/TABLE]
I'm new to Excel Scripting.
I need help to create below parent child relationship in excel. I have the source file in below format.
[TABLE="width: 480"]
<colgroup><col span="4"></colgroup><tbody>[TR]
[TD]Level1 [/TD]
[TD]Level2[/TD]
[TD]Level3[/TD]
[TD]Level4[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]009[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]010[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]011[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]012[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]013[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]014[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]015[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[TD]072[/TD]
[/TR]
</tbody>[/TABLE]
And my output needs to be like this
[TABLE="width: 240"]
<colgroup><col span="2"></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Parent[/TD]
[TD]Child[/TD]
[/TR]
[TR]
[TD]PC_BMROA[/TD]
[TD]CD_KENBM[/TD]
[/TR]
[TR]
[TD]CD_KENBM[/TD]
[TD]24158[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]009[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]010[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]011[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]012[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]013[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]014[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]015[/TD]
[/TR]
[TR]
[TD]24158[/TD]
[TD]072[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 179"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]
Any help is appreciated. The number of rows will be dynamic but column can remain the same.[/TD]
[/TR]
</tbody>[/TABLE]