http://bugs.winehq.org/show_bug.cgi?id=34110
Bug #: 34110 Summary: MS Excel 2010 escape/unescape problem in sheet names Product: Wine Version: 1.6-rc5 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: lviggiani@gmail.com Classification: Unclassified
Created attachment 45356 --> http://bugs.winehq.org/attachment.cgi?id=45356 Test example
1) Create a new Excel file. 2) Remane sheet 1 as "a & b" (without quotes) 4) Put some value in first cell 3) Go to sheet 2 and link the first cell to first cell of sheet 1 (now named as "a & b") (='a & b'!A1) 4) Save (as .xlsx / MS Excel 2010) and close Excel 5) Reopen excel and load the saved file 6) It will display a "broken link error" and the first sheet will now be named as "a & b" whereas first cell of second sheet still links to ='a & b'!A1 (correct)
It seems a escape / unescape issue while opening the .xlsx. I'm pretty sure the issue is while opening, not sving, as the same issue occurs if you create the file as described above in windows and try to open in linux with wine.
The issue is occurring since wine 1.5. It wasn't in the past.
I've attached the test .xlsx file
http://bugs.winehq.org/show_bug.cgi?id=34110
Luca Viggiani lviggiani@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lviggiani@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=34110
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |msxml3
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com 2013-07-22 02:59:07 CDT --- Hi, Luca.
This is very likely a msxml3 bug, you could try to 'winetricks msxml3 msxml6' to confirm that.
I suspect the problem is in how libxml2 reports attribute values. Document has the following for sheet name:
--- <sheet name="a & b" sheetId="1" r:id="rId1"/> ---
and libxml2 has explicit check for '&' entity in xmlParseAttValueComplex():
--- if ((ctxt->replaceEntities == 0) && (ent->content[0] == '&')) { buf[len++] = '&'; buf[len++] = '#'; buf[len++] = '3'; buf[len++] = '8'; buf[len++] = ';'; } else { buf[len++] = ent->content[0]; } ---
meaning that for parsed entity reference that represents '&' it does substitution that results in attribute value you got in Excel.
I'll take a look what could be done there.
http://bugs.winehq.org/show_bug.cgi?id=34110
--- Comment #2 from Luca Viggiani lviggiani@gmail.com 2013-07-22 11:32:55 CDT --- Hi Nikolay, overriding msxml3 doesn't change. Overriding msxml6 Excel says that the file is corrupt and doesn't even open it :(
http://bugs.winehq.org/show_bug.cgi?id=34110
--- Comment #3 from Luca Viggiani lviggiani@gmail.com 2013-07-22 11:37:16 CDT --- Just for info, winetrick gives me this erro when I try to install msxml3:
msxml3 install completed, but installed file /home/lviggiani/.wine/dosdevices/c:/windows/syswow64/msxml3.dll not found
http://bugs.winehq.org/show_bug.cgi?id=34110
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com 2013-07-22 11:41:11 CDT --- Ah, you're using 64-bit prefix, I almost never use that so there could be surprises I don't know about. I already did some tests and it looks like '&' unescaping is done wrong, that could explain your problem. I need to do more tests and actually try with Excel to confirm.
http://bugs.winehq.org/show_bug.cgi?id=34110
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #5 from Dan Kegel dank@kegel.com 2013-07-22 16:29:59 CDT --- Luca, winetricks is not too clever about handling 64 bit wineprefixes yet.
Does reinstalling in a clean 32 bit wineprefix help, btw?
http://bugs.winehq.org/show_bug.cgi?id=34110
--- Comment #6 from Luca Viggiani lviggiani@gmail.com 2013-07-23 01:07:36 CDT --- Well honestly I thought I was using a 32 bit prefix... :( The thing is that I'm moving that wine prefix from a computer to another bacouse I have an issue with reinstalling Office from the original DVD. The thing is that my new laptop is not equipped with a DVD drive. So I had created an ISO image out of the original installation DVD (original Microsoft DVD with all licenses etc). Mounting the ISO in WINDOWS and installing from there in WINDOWS, everything works. If I mount it in linux (ubuntu) and install from there in wine, the installer starts but then it tells me that the installation media is invalid or not original etc... So that's why I'm moving the wine prefix from other computer. That wine prefix was created by
WINEARCH=win32 winecfg
Is that the correct way to create it? Could it be that leter on, while updating wine, it has been converted to 64 bit? Is it possible to convert it back to 32 bit?
Thanks
http://bugs.winehq.org/show_bug.cgi?id=34110
--- Comment #7 from Luca Viggiani lviggiani@gmail.com 2013-07-23 01:23:27 CDT --- Actually the installer says "unsupported installation language" when installing office from ISO in wine only
http://bugs.winehq.org/show_bug.cgi?id=34110
--- Comment #8 from Luca Viggiani lviggiani@gmail.com 2013-07-23 01:49:45 CDT --- OK I managed creating a clean 32 bit prefix and reinstall office 2010 (I had to share the DVD from a Windows computer through the lan). BY overriding msxml3 the "&" bug is not showed.
http://bugs.winehq.org/show_bug.cgi?id=34110
--- Comment #9 from Nikolay Sivov bunglehead@gmail.com 2013-07-23 07:12:40 CDT --- Created attachment 45365 --> http://bugs.winehq.org/attachment.cgi?id=45365 patch
This patch fixes it for me. I still need to write some tests and think if anything will break with it.
http://bugs.winehq.org/show_bug.cgi?id=34110
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #45365|0 |1 is obsolete| |
http://bugs.winehq.org/show_bug.cgi?id=34110
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |b1bf9a62f94f6a6103eba0405ed | |693d4f8f6a39f Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #10 from Nikolay Sivov bunglehead@gmail.com 2013-07-31 15:40:42 CDT --- This is fixed with b1bf9a62f94f6a6103eba0405ed693d4f8f6a39f.
http://bugs.winehq.org/show_bug.cgi?id=34110
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org 2013-08-02 13:19:16 CDT --- Closing bugs fixed in 1.7.0.
http://bugs.winehq.org/show_bug.cgi?id=34110
Maksim Melnikau maxposedon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |maxposedon@gmail.com
--- Comment #12 from Maksim Melnikau maxposedon@gmail.com 2013-11-04 06:30:16 CST --- FYI, World of Tanks launcher was also affected with this bug
http://bugs.winehq.org/show_bug.cgi?id=34110
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.6.x
http://bugs.winehq.org/show_bug.cgi?id=34110
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.6.x |---
--- Comment #13 from Alexandre Julliard julliard@winehq.org 2013-11-15 13:40:48 CST --- Removing 1.6.x milestone from bugs included in 1.6.1.