dbzhang800 / QtXlsxWriter

.xlsx file reader and writer for Qt5
http://qtxlsx.debao.me
Other
1.24k stars 632 forks source link

Extracting data from a password protected xlsx file? #121

Closed dillydill123 closed 8 years ago

dillydill123 commented 8 years ago

Hello, I'm using QtXlsxWriter with Qt 5.6 (using the updated one by VSRonin), and I have been able to read and write to xlsx files just fine. However, I am trying to read from a password protected xlsx file (just read, not write) and I am not able to do so. I have no compiling errors, but the Application output on Qt says the following:

QZip: not a zip file!

I am only running one line of code:

QXlsx::Document excel("path\\to\\xlsx");

Is it possible to read from a password protected xlsx file? Thanks for any guidance

VSRonin commented 8 years ago

This feature is currently not supported. The error you are getting is due to the structure of a protected workbook being completely different from a normal one. If you open a protected and unprotected file with a zip reader (e.g. 7zip ) you'll clearly see what I mean

dillydill123 commented 8 years ago

Thank you for a quick response.

VSRonin commented 8 years ago

if you or anybody else is interested in adding this feature the reference is section 17.15.1.29 of the current (2012) standard