Comments (6)
Hi Nai-Yuan,
There are two kinds of password protection. One encrypts the file, the other just adds an attribute to the XML. The second kind should already work since that attribute is ignored though I haven't tested it. File level encryption is more complicated, but I should be able to implement it if there's demand for it. Could you possibly send me a basic password-protected file and the password so I can try it? (I don't have Excel on my laptop) My email is .
Thomas
from xlnt.
Hi Thomas,
Thanks for your reply and sorry for my late reply. I just came back from a
business trip.
I attached one password protected .xlsx file for you to test, and its
password is "test".
Thanks again for your help.
Cheers,
Nai-Yuan
On Thu, Sep 22, 2016 at 8:29 PM, Thomas Fussell [email protected]
wrote:
Hi Nai-Yan,
There are two kinds of password protection. One encrypts the file, the
other just adds an attribute to the XML. The second kind should already
work since that attribute is ignored though I haven't tested it. File level
encryption is more complicated, but I should be able to implement it if
there's demand for it. Could you possibly send me a basic
password-protected file and the password so I can try it? (I don't have
Excel on my laptop) My email is [email protected] .Thomas
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#69 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AJpqPBU9y_ZRZHEK2NEDnPghirvoSNW3ks5qsx1vgaJpZM4KEfUP
.
from xlnt.
Hi Nai-Yuan,
I'm afraid the attachment didn't come through on the email. It looks like you may be able to attach it here if you want to try again. I do have some updates on implementing this feature. It's been a nice little challenge reverse engineering how this encryption system works. I now have code working for reading encrypted XLSX files from before Office 2013. Newer XLSX files use a different type of encryption called Agile which I think I will be able to finish in the next few days.
Thomas
from xlnt.
Hi Nai-Yuan,
I've recently committed some code for reading encrypted XLSX files. It will require you to link with NSS which is the only cryptographic provider I could find which implements the form of encryption used by Excel 2013 and later. If you're on windows you can use the new submodule called third-party/nss to compile this library (cd third-party/nss && mkdir build && cd build && cmake .. && cmake --build .) On Linux and OS X you'll need to change the include_directories in cmake/xlnt.cmake to point to the location of your system NSS libraries installed via Homebrew or another package manager. Lastly, you'll need to compile xlnt with the new cmake definition "-D WITH_CRYPTO=1". I'll continue to make this process easier in the coming week.
Thomas
from xlnt.
Hi Thoms,
Thanks a lot for your help!
This is really an exciting news.
Cheers,
Nai-Yuan
On Oct 24, 2016 8:41 AM, "Thomas Fussell" [email protected] wrote:
Hi Nai-Yuan,
I've recently committed some code for reading encrypted XLSX files. It
will require you to link with NSS which is the only cryptographic provider
I could find which implements the form of encryption used by Excel 2013 and
later. If you're on windows you can use the new submodule called
third-party/nss to compile this library (cd third-party/nss && mkdir build
&& cd build && cmake .. && cmake --build .) On Linux and OS X you'll need
to change the include_directories in cmake/xlnt.cmake to point to the
location of your system NSS libraries installed via Homebrew or another
package manager. Lastly, you'll need to compile xlnt with the new cmake
definition "-D WITH_CRYPTO=1". I'll continue to make this process easier in
the coming week.Thomas
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#69 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AJpqPCYSN0JF7jG0eM4rQwlyqrVHjGDeks5q3KeEgaJpZM4KEfUP
.
from xlnt.
It was quite complicated to implement, but I learned a lot about cryptography in the process. I managed to change nss over to botan yesterday which is significantly easier to build. Cryptography will be included with all builds now so there's no need to add "-D WITH_CRYPTO=1" to cmake. I only had a few example of encrypted XLSX files so there may be some that don't work yet. Please reopen this issue if it doesn't work for you.
from xlnt.
Related Issues (20)
- Is it possible to write a whole record i.e std::vector<std::string> into the xlnt::worksheet instead of writing cell by cell?
- Throw "counts don`t match" exception HOT 1
- How do I insert a picture as embedded in a cell ? HOT 1
- When string tables entries exceed 1000, a ',' is being inserted in the string table number, resulting in errors opening file HOT 1
- C++23 aligned storage deprecation warning
- Reference counting issues with xlnt::format_impl
- Do Excel files not support Chinese path? HOT 1
- Fresh release HOT 2
- Errors when try to use in Windows
- Crash on Release HOT 1
- Cloning project failed HOT 1
- Read xls file? HOT 1
- password
- error in Add Password: wb.save("lots_of_properties.xlsx","password");
- throws exception when I use load function to load an xlsx file containing functions HOT 6
- Multiple exceptions when `count` does not match the number of elements HOT 6
- parser.cxx HOT 1
- One Problem Of Excel_Consumer.cpp
- save xlsx file then use excel open has issue
- save xlsx file then use excel open has issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xlnt.