FlowHeater - The Data Import / Export Specialist
See also the existing examples of using the TextFile Adapter , which may answer your question: text file codepage converting 1 / 2 , processing of CSV header and footer rows , Import/Export vCard (line based) text files

Export Data where the new column headers are in rows

  • George
  • Topic Author
  • Offline
  • New Member
  • New Member
11 years 6 months ago #2133 by George
Hi Guys
I need some help please.
I am trying to import the attached file and export it to a TXT format so I can then import it into my ACT! database.

The problem I have is:
1. The columns headers (for the output file) are in rows separated by colons, and the value of the data is in the same row.

2. The email addresses at the beginning of each enquiry; i need flowheater to pass it and not import it.

If someone could please assist that would be great


Attachment test.txt not found


Please Log in or Create an account to join the conversation.

11 years 6 months ago #2134 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:Export Data where the new column headers are in rows
Hi George,

This challenge is possible but a bit tricky :)

First you need one GroupBy Heater for group all email rows to one row. To determinate each email we need an additional .NET Script Heater and the following little script.
int nGroupCount = 0; public object DoWork() { if (InValues.Length != 1) throw new Exception("1 Inputparameter expected"); // get the first input parameter string sIN = (string)InValues[0].GetString(); if (sIN == null) return nGroupCount; if (sIN.IndexOf("From:", StringComparison.CurrentCultureIgnoreCase) >= 0) { // if we found the string "From: " in the line we have a new group nGroupCount++; } return nGroupCount; }

The Script checks each line. If the line contains the string "From:" then we have a new group or a new email.

Second we need to fill the columns with the certain field parts. For this you have to use for each column you want to export the IF-THEN-ELSE Heater and the String Split Heater .

The Split Heater splits only each line into 2 Parts using the delimiter ": "

e.g. Email Address: hottie@hot.com
First part: Email Address
Second part: hottie@hot.com

In the IF-THEN-ELSE Heater you have to specified for each column a condition like this
** Email Address

Note: ** is the InString operator!

If the condition match the Value goes out from the IF-THEN-ELSE Heater to the column "Email Address".
To demonstrate this I have made an example; please have a look to the attachment.

Attachment rows_to_columns.zip not found

Hope this helps

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.

Please Log in or Create an account to join the conversation.

Time to create page: 0.325 seconds

other Languages


FlowHeater Home

de en


Privacy Statement

Copyright © 2009-2023 by FlowHeater GmbH.
All rights reserved.

Follow us on

twitter  facebook


 de en