Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

How to protect excel sheet in d365fo

Posted on by 25
Hello.

I asked 2 questions, but I didn't get the answer I wanted, so I'm writing.

I want to do 'excel sheet protection' when I make excel file in d365fo, but I only got indirect answers.

I want a direct code that does excel sheet protection.

Thank you for reading the question
  • Martin Dráb Profile Picture
    Martin Dráb 229,857 Most Valuable Professional on at
    How to protect excel sheet in d365fo
    Good! I'm glad you found in the end that the approach I suggested indeed solves the problem.
     
    For reference, the discussion is split to three threads with the same name. If anyone is interested in details, please refer to them.
    js lee, please use replies next times, instead of creating several new threads on the same topic.
  • js lee Profile Picture
    js lee 25 on at
    How to protect excel sheet in d365fo
    After many attempts, we succeeded as follows
     
     
       ExcelSheetProtection   _Protection =  worksheet.protection;
       _Protection.isProtected = true;
       _Protection.SetPassword("123");
      package.Save();

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,086 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,857 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans