Dynamic data import / export


simply more productive
Up to 10,000 records can be processed with the freeware version!
Welcome, Guest
Username: Password: Remember me
Welcome to the FlowHeater support forum.

Questions about using FlowHeater are answered here.

TOPIC: From Excel to Flat Txt File - rows to columns

From Excel to Flat Txt File - rows to columns 3 years 8 months ago #2277

  • Gennaro
  • Gennaro's Avatar
  • Offline
  • Junior Member
  • Posts: 25

I have an inoput file like this:

and I need to produce a txt output like this:

Basically, on the output I have to put on the same row, the records from 1 to 4 of the input file, then, continue with the second row with the records 5 to 8, and so on.

Is something that I can manage with flowheater?

thanks for your help


Attachment example_output.txt not found

The administrator has disabled public write access.

Re:From Excel to Flat Txt File - rows to columns 3 years 8 months ago #2278

  • FlowHeater-Team
  • FlowHeater-Team's Avatar
  • Offline
  • Administrator
  • Posts: 240
Hi Gennaro,

It's possible but a bit tricky ;)

You need the GroupBy Heater to grouping the CSV or Excel records. The problem is that usually the GroupBy Heater group’s data related to the content.

In your case you need the .NET Script Heater and a short C# Script to simulate the group value. Please have a look to the example I’ve attached. In the Script there is a remark were you can change how many rows are grouped together.

With this we can group always four CSV or Excel rows on the READ site to one record on the WRITE.

Now we just have to decide which row/content we have to move to the WRITE side. You need for each field one IF-THEN-ELSE condition together with one AutoID Heater to decide which grouped row you want to put to the WRITE.

NOTE: The IF-THEN-ELSE condition =1 means that the row content from the first are moved to the field, =2 ….

Attachment grouping_csv_records.zip not found

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.
The administrator has disabled public write access.
Moderators: FlowHeater-Team
Time to create page: 0.078 seconds