Consolidating data into a couple of lines

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
Tractebel

Consolidating data into a couple of lines

Post by Tractebel »

We have a csv file broken out into multiple sections......

Hour,1,2,3,4,5
Temp,50,51,52,53

Hour,6,7,8,9,10
Temp,50,51,52,53

Hour,11,12,13,14,15
Temp,50,51,52,53

Id like to move the data to be only on two lines.

Hour,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
Temp,50,51,52,53,50,51,52,53,50,51,52,53

Is there an existing template or something to do this? We have the registered pro version of textpipe pro fyi if that matters.

-Tractebel
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

The best way would be to sort all the lines so all the hours/Temp go together, then use an EasyPattern to restrict to all lines starting with 'Hour', and inside it, remove all
'Hour', repalce all line feeds with commas, then add a Header to put 'Hour' back in again. Do the same for Temp.
Post Reply