Created attachment 91546 [details] password protected rar with the two sample files Hello to the Team, I have an Excel 2010 Macro Template file (.xltm) which is being used for doing weekly worktime reports. This Excel will saved as normal xlsx. The file makes heavy use of the functions cell grouping and cell protection. Both files are cannot be opened by the latest LO version 4.2.0.1. While opening the template LO stops working with an error "Wrong file version." And when it opens the xslx the cells cannot be edited. So further testing is impossible. This Excel might be a good example for testing complaince to MSOXML files. Best regards Alex
Could you please attach a zip file instead of rar? On pc Debian x86-64, testing, I can't open the rar file.
(In reply to comment #0) > Created attachment 91546 [details] > password protected rar with the two sample files @Alex: How should we open that file it it's password protected? If the file contains confidential information, please replace it with some junk and re-upload. Thanks.
Created attachment 91657 [details] Excel Template with Macros Hi, I attached the file without zipping or rar them. Bets regards Alex
Created attachment 91658 [details] .xlsx versin after saving
I can confirm that the template doesn't open using a recent master (Build ID: 3df9adb1b0031e77977431c90edee651b2aaa195), and also using an older build from 2013-10-21 (Build ID: 051731bbcaa79b6428c8ebee6c114c9b28220cc8). But it opens fine using 4.1.4. So it's a regression. The error is indeed 'Version Incompatibility. Incorrect file version.', but only when not choosing the exact format from the drop-down box (probably thrown by one of the type detectors). When choosing the right format, the error is 'General Error. General input/output error.'. Examining the file with 7zip shows an encrypted Compound file (= MS Office binary). But strange that it opens with Excel 2010 SP2 without asking any password. So I'm not sure how to reproduce such file. I tried to create password protected file with Excel, and it looks the same internally (using 7zip), but it doesn't open even with 4.1.4 (with the same error). @Julien: Do you know anything about support of encrypted files? Does it a known limitation?
On pc Debian x86-64 with master sources updated today, I can't open the file too (version incompatibility, Incorrect file version) I noticed these in console logs: warn:oox.storage:29578:1:oox/source/helper/zipstorage.cxx:70: ZipStorage::ZipStorage exception opening input storage: warn:oox.storage:29578:1:oox/source/helper/zipstorage.cxx:70: ZipStorage::ZipStorage exception opening input storage: :1: parser error : Document is empty ࡱ ^ I must do more tests.
When selecting template Excel 2007/2010 I've got a message general input/output error I've got this on console: warn:oox.storage:29578:1:oox/source/helper/zipstorage.cxx:70: ZipStorage::ZipStorage exception opening input storage: warn:legacy.osl:29578:1:oox/source/core/filterbase.cxx:530: FilterBase::setMediaDescriptor - missing input stream About the xlsx file, I can open it but can't change the cells because password given via private email by Alexander doesn't unlock. Either a problem with password or with the algo used by LO. Maxim: I know that there are function related to encryption in LO but I don't know much more about this. Anyway, I put it at NEW since there's indeed a problem here and put on cc main Calc devs for any suggestion.
(In reply to comment #6) > :1: parser error : Document is empty > ࡱ > ^ This output if from KeynoteImportFilter detector. At end it's detected by draw.FormatDetector as 'impress_MS_PowerPoint_97_Vorlage'.
About the template, it seems there's a problem here: package/source/xstor/xfactory.cxx 49 // TODO/LATER: should the disk spanned files be supported? 50 // 0x50, 0x4b, 0x07, 0x08 51 return ( nRead == 4 && aData[0] == 0x50 && aData[1] == 0x4b && aData[2] == 0x03 && aData[3] == 0x04 ); and here's what I got: (gdb) p aData $16 = uno::Sequence of length 4 = {-48 '\320', -49 '\317', 17 '\021', -32 '\340'} I don't know if it explains the whole thing but it doesn't seem right.
(In reply to comment #7) > When selecting template Excel 2007/2010 > I've got a message general input/output error > I've got this on console: > warn:oox.storage:29578:1:oox/source/helper/zipstorage.cxx:70: > ZipStorage::ZipStorage exception opening input storage: > warn:legacy.osl:29578:1:oox/source/core/filterbase.cxx:530: > FilterBase::setMediaDescriptor - missing input stream > > About the xlsx file, I can open it but can't change the cells because > password given via private email by Alexander doesn't unlock. > Either a problem with password or with the algo used by LO. > > Maxim: I know that there are function related to encryption in LO but I > don't know much more about this. > > Anyway, I put it at NEW since there's indeed a problem here and put on cc > main Calc devs for any suggestion. Hi Julien, the password for unlocking the sheet protection was already send to you and Maxim. My assumption was that due to an issue with the parser cells which shouldn't be protected are protected in LO. The parser issue shown on cli seems to be a different one. I'll attach a sample xlsx with data in it to show how the file is used. Best regards Alex
Created attachment 91734 [details] Excel with Sample Data
(In reply to comment #9) > About the template, it seems there's a problem here: > package/source/xstor/xfactory.cxx > 49 // TODO/LATER: should the disk spanned files be supported? > 50 // 0x50, 0x4b, 0x07, 0x08 > 51 return ( nRead == 4 && aData[0] == 0x50 && aData[1] == 0x4b > && aData[2] == 0x03 && aData[3] == 0x04 ); @Julien: Those values are for zip based files, but encrypted office files are of different format called 'Compound', and shouldn't be treated as zip.
Not reproducible anymore as of 4.2.6.2/4.3.0.4/master, so closing as WORKSFORME. Feel free to reopen if it still doesn't work for you.
Version set from description. Best regards. JBF