Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

Copy spreadsheet from one excel and paste into another excel

Like (2) ShareShare
ReportReport
Posted on 31 Jul 2024 20:23:48 by 23
Hello,

I have an Excel file that has several different spreadsheets, but I want to copy only the data from the "FormOP" spreadsheet and paste it into a new Excel file.
Is it possible to do this using MS Automate online?
  • Suggested answer
    takolota1 Profile Picture
    4,859 Super User 2025 Season 1 on 06 Oct 2024 at 23:26:14
    Copy spreadsheet from one excel and paste into another excel
    You can also use this template Azure Function to pull data from any Excel sheet without the need for table formatting...
    https://community.powerplatform.com/galleries/gallery-posts/?postid=eea06380-8483-ef11-ac21-7c1e5201b42f
  • shravanreddy13 Profile Picture
    17 on 02 Aug 2024 at 03:13:41
    Copy spreadsheet from one excel and paste into another excel

    Yes, you can automate the process of copying data from a specific sheet in an Excel file to a new Excel file using Power Automate (formerly Microsoft Flow). Here’s a step-by-step guide on how to set this up:

    Step-by-Step Guide to Automate Copying Data Using Power Automate

     

     
    1. Create a New Flow:

      • Click on "Create" from the left sidebar.
      • Choose "Automated cloud flow" or "Instant cloud flow" depending on whether you want to trigger it manually or automatically.
    2. Define a Trigger:

      • For an Automated cloud flow, you’ll need to select a trigger like “When a file is created or modified” in OneDrive or SharePoint, depending on where your file is located.
      • For an Instant cloud flow, you can manually trigger the flow from the Power Automate interface.
    3. Add Actions to Copy Data:

      • Get File Content:

        • Add a new step and select the "Get file content" action.
        • Choose your file location (OneDrive, SharePoint, or other).
        • Specify the path to your Excel file.
      • Read Data from Excel:

        • Add a "List rows present in a table" action from the "Excel Online (Business)" connector.
        • Select your file and specify the "FormOP" sheet from which you want to read the data. Ensure your data is formatted as a table in the Excel file for this to work.
      • Create New Excel File:

        • Add a "Create file" action.
        • Choose the location (OneDrive, SharePoint) where you want to save the new Excel file.
        • Specify the file name and path.
      • Add Rows to New Excel File:

        • Add a "Add a row" action to insert data into the new file.
        • Specify the file and table where you want to add the rows. You may need to format the new file similarly to the original.
    4. Test Your Flow:

      • Save and test your flow to ensure it works as expected.
      • Check the new Excel file to verify that the data from the "FormOP" sheet has been copied correctly.

    Detailed Steps for Reading and Writing Data

    Get File Content

    • Action: Get file content
    • Location: Choose the location (e.g., OneDrive for Business, SharePoint)
    • File Identifier: Path to the Excel file containing the "FormOP" sheet.

    Read Data from Excel

    • Action: List rows present in a table
    • File: Use the file identifier from the previous step
    • Table Name: Select the table corresponding to the "FormOP" sheet.

    Create New Excel File

    • Action: Create file
    • Location: Choose the destination (e.g., OneDrive for Business)
    • File Name: Specify the name for the new Excel file
    • File Content: Use content or template as needed.

    Add Rows to New Excel File

    • Action: Add a row into a table
    • File: Choose the new Excel file
    • Table Name: Specify the table in the new file
    • Row Data: Map the data from the "FormOP" sheet.

    Notes

    • Ensure that both the source and destination Excel files have tables defined in them. Power Automate uses these tables to identify and manipulate data.
    • You may need to adjust the schema of your destination file to match the source file’s structure.

    By following these steps, you can automate the process of copying data from a specific sheet in an Excel file to a new Excel file using Power Automate.

  • Suggested answer
    Michael E. Gernaey Profile Picture
    41,969 Super User 2025 Season 1 on 01 Aug 2024 at 04:40:36
    Copy spreadsheet from one excel and paste into another excel
    Hi,
     
    Yes but you have many details missing.
     
    1) Do you want this to run at a certain time of day, or week or is it manually triggered?
     
    Its easy to do as long as the following
     
    1) that the Spreadsheet that has the source data has an excel table wrapped around it AND that the Excel you want to paste too, also has a Table around the rows
    you want to add too
     
    2) then in your flow you would do
    List rows from a Table (Excel Action). specifying the correct table
     
    3) add an apply to each with the input being the output of step 2
     
    4) for each Loop.
    use Add row to a table (excel action)
    where you populate the data for excel from the Apply to Each Loop
     
    And done.
     
    Its not hard but you have things that have to exist, such as the Tables I mentioned, knowing the location of the files etc.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 61

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 47 Super User 2025 Season 1

#3
rzaneti Profile Picture

rzaneti 31 Super User 2025 Season 1

Overall leaderboard
Loading started