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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How to protect excel sheet in d365fo

(0) ShareShare
ReportReport
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
  • js lee Profile Picture
    25 on at
    After many attempts, we succeeded as follows
     
     
       ExcelSheetProtection   _Protection =  worksheet.protection;
       _Protection.isProtected = true;
       _Protection.SetPassword("123");
      package.Save();
  • Martin Dráb Profile Picture
    241,637 Most Valuable Professional on at
    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.

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!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 274 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 213

#3
Subra Profile Picture

Subra 202 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans