andyfox1979
New Member
- Joined
- Dec 5, 2012
- Messages
- 32
So I have some data exported from an ecommerce store. Tabe delimited file. I've created two delimiters, ^ and ##:
^ is before each order number. This indicates notes are over, or new order number
## indicates notes begin. If there is nothing after this across the row (say, 5 rows over) then notes are empty, output should just be order number and blank notes.
Want to join all associated notes after the ## and 5 rows across and before the next ^ in a cell below--- join all of this in a single corresponding cell on an seperate output page.
Example Data
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Order[/TD]
[TD]Notes[/TD]
[TD]Notes2[/TD]
[/TR]
[TR]
[TD]^485 ## 2004 Jun 26 18:51: Marked Cancelled[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]> 2004 Jun 26 18:51: Cancelled; Reason: Customer changed mind[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]> 2004 Jul 6 10:41: Modified by Wayland[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]^486## Cancelled[/TD]
[TD]By[/TD]
[TD]Tom[/TD]
[/TR]
[TR]
[TD]^487##[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Desired Output
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Order[/TD]
[TD]Notes[/TD]
[TD]Notes2[/TD]
[/TR]
[TR]
[TD]485[/TD]
[TD]2004 Jun 26 18:51: Marked Cancelled by Wayland > 2004 Jun 26 18:51: Cancelled; Reason: Customer changed mind > 2004 Jul 6 10:41: Modified by Wayland[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]486[/TD]
[TD]Cancelled By Tom[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]487[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any hints on where to go from here would be greatly appreciated!
^ is before each order number. This indicates notes are over, or new order number
## indicates notes begin. If there is nothing after this across the row (say, 5 rows over) then notes are empty, output should just be order number and blank notes.
Want to join all associated notes after the ## and 5 rows across and before the next ^ in a cell below--- join all of this in a single corresponding cell on an seperate output page.
Example Data
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Order[/TD]
[TD]Notes[/TD]
[TD]Notes2[/TD]
[/TR]
[TR]
[TD]^485 ## 2004 Jun 26 18:51: Marked Cancelled[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]> 2004 Jun 26 18:51: Cancelled; Reason: Customer changed mind[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]> 2004 Jul 6 10:41: Modified by Wayland[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]^486## Cancelled[/TD]
[TD]By[/TD]
[TD]Tom[/TD]
[/TR]
[TR]
[TD]^487##[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Desired Output
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Order[/TD]
[TD]Notes[/TD]
[TD]Notes2[/TD]
[/TR]
[TR]
[TD]485[/TD]
[TD]2004 Jun 26 18:51: Marked Cancelled by Wayland > 2004 Jun 26 18:51: Cancelled; Reason: Customer changed mind > 2004 Jul 6 10:41: Modified by Wayland[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]486[/TD]
[TD]Cancelled By Tom[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]487[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Any hints on where to go from here would be greatly appreciated!