Skip to main content
simply more productive

The Data Specialist

Thanks to our intuitive transformation designer, you can convert data effortlessly to a variety of formats without knowing how to program. It’s not only efficient, it’s also easy to use.
Flowheater Download

From Excel to Flat Txt File - rows to columns

More
10 years 11 months ago #2277 by Gennaro
hello,

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

regards

Attachment example_output.txt not found

Attachments:

Please Log in to join the conversation.

More
10 years 11 months ago #2278 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:From Excel to Flat Txt File - rows to columns
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.
Attachments:

Please Log in to join the conversation.

Time to create page: 0.330 seconds

FlowHeater - The Data Specialist

Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.

Rechtliches

Support & Contact

Kontaktinformation

Telefon:0951 / 99339792 E-Mail:This email address is being protected from spambots. You need JavaScript enabled to view it.

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