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
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.
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:
If I have answered your question, please Accept the post as solution.
If you like my response, please Thumbs Up.
@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
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.
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.
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:
So can you please help in this regards?
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.
WarrenBelz
146,731
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,077
Most Valuable Professional