excel4node
excel4node copied to clipboard
Password protection for file
First of all i would thank you for an awesome library :) Is there any way of generating an excel with password protection. Also read an file with password given for those. Awaiting for your response author
There are two kinds of workbook password protections. There is the "Password to open" and "Password to modify". The password to modify is pretty easy to implement as it just adds a few attributes to the workbook XML files. I just pushed a commit into the dev branch that adds the ability to protect a workbook and worksheets from modification. The "Password to open" actually changes how the whole structure of the xlsx file and encrypts the data within the Excel workbook. That is a much larger undertaking. If you were asking for the password to modify option, go ahead and clone the dev branch and see if this will work for you. If you were asking for the password to open option, it may be a while before I can get that added. Right now, the excel4node module does not have the ability to read in a file at all, much less a password protected one. That is already listed as an enhancement issue, though.
Thanks for the consideration. By default wb.write(filename); generates xlsx without any password. I was looking for generating xlsx file with password optionally. And read the same file giving password from app itself. Modifying password is also a good one. Could you please brief in detail with an example in readme about this. And one more thing is can you please give an example of border creation. I am trying something like : I have changed a bit when i working in dynamic population as per the requirement. And cell.Format.Fill.Color(color); // works with the existing feature provided,
But cell.Format.Border({ top:{ style:'thin', color:'CCCCCC' }, bottom:{ style:'thick' }, left:{ style:'thin' }, right:{ style:'thin' } });
throwing error as Border function undefined. Please correct me if i am doing wrong with an simple example for this as well
oK. I'll keep this issue open until I can add the ability to add "Password to open" Please open new issue for the Border item rather than adding it to this chain.
Password to open
is still missing ?
Can we lock/unlock selected cells. I want to protect entire sheet except few columns/cells should be editable
Hi @Bhawnananda did you ever find a solution for this
Is there any movement on this? @natergj My team and I at FormHero would be interested in contributing.
Could you point us in the right direction as far as where you think changes will need to be made and any specifications around the password protection in the XLSX spec?
It looks like the encrypted workbooks are stored in the same OLE format at the old xls documents. I don't think to add encryption support is going to be a straight forward process. "password protected" is a bit ambiguous when it comes to xlsx. It is fairly straight forward to "protect" a workbook from edits, but encryption is a different story.
hi, I want to protect the entire sheet except for a few columns. How can I do it? Please guide?