Skip to main content

Notifications

Community site session details

Community site session details

Session Id : PA63zzH02R6lavF6Ykzdzf
Power Automate - General Discussion
Unanswered

Need help in populating a password protected excel file using power automate

Like (0) ShareShare
ReportReport
Posted on 29 Jul 2023 07:13:37 by 20

Hi,

I have created an excel file File1.xlsx using another password protected blank excel file which act as a template for File1.xlsx . But when I am trying to create table and populate data in File1.xlsx using Power Automate it is throwing error and the data is getting populated in File1.xlsx.

 

Need help in this issue.

 

Thanks

  • SamLed Profile Picture
    2,332 Moderator on 29 Jul 2023 at 17:54:53
    Re: Need help in populating a password protected excel file using power automate

    Found that in forum, scroll down a bit  : Re: Need help in creating a password protected exc... - Power Platform Community (microsoft.com)

     

    [EDIT] LMAO this is a thread you submit 😂 

     

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

  • SamLed Profile Picture
    2,332 Moderator on 29 Jul 2023 at 14:37:51
    Re: Need help in populating a password protected excel file using power automate

    Well, if you can unprotect using a script, you can protect back calling another script using the proper method.

     

    Check: ExcelScript WorksheetProtection interface - Office Scripts | Microsoft Learn

    Have a look at this method:

    protect(options, password)

    Protects a worksheet. Fails if the worksheet has already been protected.

     

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

  • Disha2023 Profile Picture
    20 on 29 Jul 2023 at 13:00:58
    Re: Need help in populating a password protected excel file using power automate

    @SamLed ,

    Ok. But I want the final file to be password protected. If I unprotect it and populate the data. Then after that what should I do so that the file is password protected and it asks for password whenever I will open the file.

     

    Can you please help

  • SamLed Profile Picture
    2,332 Moderator on 29 Jul 2023 at 12:06:30
    Re: Need help in populating a password protected excel file using power automate

    That's exactly what I assumed, the connector has been refused workbook edition by underlying graph API because workbook is protected. As you copy template protected workbook by getting content and create file with that content, new file has same protection.

     

    You won't be able to edit workbook until you removed protection. In my previous answer I post this : https://stackoverflow.com/questions/76013362/unprotect-excel-files-using-power-automate

    Check out and try solution proposed to unprotect workbook you want to add table to.

     

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

  • Disha2023 Profile Picture
    20 on 29 Jul 2023 at 11:55:14
    Re: Need help in populating a password protected excel file using power automate

    Hi @SamLed ,

    Thanks for your reply

    First I had created a blank Excel file name Template1.xlsx and had protected it 'Encrypt with Password', so that whenever I will open it, it will require password to open the file.

    Then I had used this Template1.xlsx as a template to create a file named File1.xlsx in Power Automate. The creation of File1.xlsx is successful.

    Then in Power Automate I had used create table connectors and add row into table connectors to populate data into File1.xlsx. 

    When the flow is running it gets failed in the Create table connector with error as shown in screenshot.

    Disha2023_0-1690631672394.png

    I want to create a file with data populated and is password protected so that when I open the file, it asks for password everytime as below:

    Disha2023_1-1690631884738.png

     

    So can you please help in this regards?

  • SamLed Profile Picture
    2,332 Moderator on 29 Jul 2023 at 10:21:59
    Re: Need help in populating a password protected excel file using power automate

    Hi,

    Your question is not clear, you get an error and data got populated or not ?

    Posting the error message would help to answer.

     

    But I'm going to guess data are not populated because you try to modify an excel file copied from a password protected one. Which would be obviously normal as the copy is also protected.

     

    If you want to modify such file you'll need to remove protection first. So you'll have to find a way to remove password (you must know) before trying to edit such files.

     

    I made a quick google search and found out this, I didn't test it, so don't know if it works, give it a try : Unprotect Excel FIles using power automate - Stack Overflow

     

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

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…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,077 Most Valuable Professional

Leaderboard
Loading started