web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Merge multiple cvs fil...
Power Automate
Answered

Merge multiple cvs files into separate Excel spreadsheets

(0) ShareShare
ReportReport
Posted on by 44

Hello, everyone,

I would like to combine several csv files from a sharepoint in one excel file on a sharepoint.

To do this, a separate worksheet would have to be created in a single Excel file for each individual csv file.

So the final result would be one xlsx File with one worksheet per csv file.

The name of the worksheets should be the name of the csv files without the .csv suffix.

The content in the csv files is separated with commas and must then be separated in the Excel file. (Text to columns).
The automation can be scheduled once a day. It can overwrite the xlsx file.


I found the Power Automate "Encodian" module. It looks promising and already offers many possibilities in the free version.

But I'm worried about data protection in Germany.

Can I solve my problem with Power-Automate or do I need Encodian Flowr for this?

Or can be Power BI with Power query ONLINE can be used for this process?

Thanks and Regards

Categories:
I have the same question (0)
  • pg2020 Profile Picture
    44 on at

    Hello, everyone,

    I studied the following link:

    https://learn.microsoft.com/en-us/office/dev/scripts/resources/samples/convert-csv

     

    I've already managed to convert the CSV files into xlsx files. However, I don't want to have individual xlsx files.

    I want all csv content in a single Excel file in separate worksheets.

     

    01.jpg

    The Result i want to have:
    The Worksheets should be alphabetically sorted 🙂

     

    02.jpg

  • pg2020 Profile Picture
    44 on at

    I found the next link:

    https://learn.microsoft.com/en-us/office/dev/scripts/resources/samples/combine-worksheets-into-single-workbook

     

    Got it to work One time.

     

    But the flow runs so long. 10 minutes for 3 xlsx Source files 😞
    And then never again.

    What can be wrong there?

    This script catches the xlsx from the output and adds them to one workbook

     

    EDIT:

    Got it:
    There was too much other stuff in subfolders.

    I must not have subfolders or other files than .xlsx in the "output" folder.

     

    Script ran 20 seconds for merging 3 xlsx files

  • pg2020 Profile Picture
    44 on at

    Im getting mad 😞

    The Flow is really slow.

     

    I build it on a new Tenant.

    First run was 30 seconds.

     

    Second run 5 Minutes and than aborting.

     

    Changed nothing. I dont get it.

     

    Is it because of licensing?
    Tried it with Automate Free and a Office  E3 license

     

    Do i need a full license to get Performance?

    The data is so small. 3 xlsx Files with maximum 3 rows. Just for testing.

  • Verified answer
    pg2020 Profile Picture
    44 on at

    I solved it now (really 😄 )
    The Problem was the Tutorial from MS was wrong.

     

    The solution can you read Here:
    https://powerusers.microsoft.com/t5/Building-Flows/Running-a-script-is-hit-and-miss/m-p/1829116/highlight/true#M201953

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 173 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 95 Super User 2026 Season 1

Last 30 days Overall leaderboard