-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix issue #1261 WorkbookWriter sheet.protect() function doesn't exist #1262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
protect(password, options) { | ||
// TODO: make this function truly async | ||
// perhaps marshal to worker thread or something | ||
return new Promise(resolve => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether this attribute should be declared in constructor ()
.
// worksheet protection
this.sheetProtection = null;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been added to the constructor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this really work ? I set sheet protection to true it doesn't lock a particular cell
Please merge the current master into your branch |
The implementation looks good, but I think we need a better test here. Ideally, write a file with a protection and then show that when reading the file again, the flag is set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rheidari, have you possibility to made requested changes?
Apologies for the delay, I've updated the test! |
Changes
protect
method toworksheet-writer.js
(copied fromworksheet.js
)