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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Separate an Excel Work...
Power Automate
Unanswered

Separate an Excel WorkSheet from many sheets and convert to Excel file from the existing Excel File

(1) ShareShare
ReportReport
Posted on by 65

Hi, I have an Excel File which has 2 WorkSheets, one is Input File and the other is the Input Template. Now, I need to get all the Work Sheet Names and check whether there's input template in the worksheets based on an image present inside the template. After finding it out, I need to extract the Input Template Worksheet and convert it to a separate Excel File which acts as a Input Template File

 

Kindly help me to resolve this issue.

Thanks in advance for your help.

I have the same question (0)
  • UshaJyothiKasibhotla Profile Picture
    225 Moderator on at

    Use get all work sheets activity to get the names of all the sheets present

    Use For each activity to loop through all the sheets 

    Inside for each use if activity and write the condition if currentitem = input template 

    Inside if condition

    Launch excel activity 

    Use read excel sheet activity and give current item as

    write to excel sheet give the output of read excel sheet

     

    Hope this helps 

    Usha 

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Sumitra_Sai 

     

    One query what you meant by image present in input template sheet?

    Can't we identify it by using the sheet name ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Sumitra_Sai Profile Picture
    65 on at

    Hi @UshaJyothi20 , thanks for your reply

     

    Could you please explain me through steps in power automate desktop? Because it seems like I have already tried whatever you told I guess but not sure.

    Sumitra_Sai_0-1701005396990.png

    Sumitra_Sai_2-1701005566254.png

     

     

  • Sumitra_Sai Profile Picture
    65 on at

    Hi @Nived_Nambiar ,

    Thanks for your reply.

     

    My Excel File has 2 Sheets. 1st Sheet is the Input file where the bot reads it for further processing. 2nd Sheet is the Input Template which I need to separate it from the already existing Excel File into separate Excel File. Input 

     

    What I did was, I tried uploading the sheet image of the input template in the 'If image' action. But it's not finding the image.

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @Sumitra_Sai 

     

    I think instead of trying by image to identify the input template, it would be best to try with sheet names. Take this below example:

     

    Suppose i have sheets in the below excel:

    Nived_Nambiar_0-1701008499121.png

     

    Nived_Nambiar_1-1701008506592.png

     

    Input is input sheet while 2nd sheet Input_Template is template excel sheet.

     

    Now see the flow :

    Nived_Nambiar_3-1701008623648.png

     

     

    Steps:

    1. Launch the excel workbook having two sheets and store its excel instance in ExcelInstance.

    2. Get all worksheets names of ExcelInstance  and store in SheetNames variable.

    3. Check using if condition if SheetNames variable contains Input_Template as element like below

    Nived_Nambiar_4-1701008677244.png

     

    If it contains Input_Template: Then proceed with below steps 

    a. Launch a new excel instance ExcelInstance1

    b. Copy cells from ExcelInstance 

    Nived_Nambiar_5-1701008749847.png

     

    c. Paste cells to excelinstance2 

    Nived_Nambiar_6-1701008775416.png

     

    d. Rename worksheet name of ExcelInstance2 from Sheet1 to Input_Template 

    Nived_Nambiar_7-1701008810687.png

     

    e.Save excel with a specific file  like below

    Nived_Nambiar_8-1701008840803.png

     

    f. Close Excel Instance 2

     

    Outside the loop, close input excel instance as well.

     

     

    Hope the design helps 

     

    Reason why i used copy cells and paste cells option is because they will preserve the format of cells if needed (like in my bold cells type)

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Sumitra_Sai Profile Picture
    65 on at

    Hi @Nived_Nambiar , thanks for your reply

     

    I tried the same as you suggested.

    Sumitra_Sai_0-1701060918408.png

    Sumitra_Sai_1-1701061038900.png

    Please help me out. Thanks in advance

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 282 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 159 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 146 Super User 2026 Season 2

Last 30 days Overall leaderboard