WineHQ
Bug Tracking Database – Bug 34110

 Bugzilla

 

Last modified: 2013-11-15 13:40:48 UTC  

MS Excel 2010 escape/unescape problem in sheet names

Bug 34110 - MS Excel 2010 escape/unescape problem in sheet names
MS Excel 2010 escape/unescape problem in sheet names
Status: CLOSED FIXED
AppDB: Show Apps affected by this bug
Product: Wine
Classification: Unclassified
Component: msxml3
1.6-rc5
x86 Linux
: P2 normal
: ---
Assigned To: Mr. Bugs
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-07-22 02:07 UTC by Luca Viggiani
Modified: 2013-11-15 13:40 UTC (History)
3 users (show)

See Also:
Regression SHA1:
Fixed by SHA1: b1bf9a62f94f6a6103eba0405ed693d4f8f6a39f
Distribution: ---
Staged patchset:


Attachments
Test example (8.61 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2013-07-22 02:07 UTC, Luca Viggiani
Details
patch (2.60 KB, patch)
2013-07-23 07:12 UTC, Nikolay Sivov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Viggiani 2013-07-22 02:07:28 UTC
Created attachment 45356 [details]
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
Comment 1 Nikolay Sivov 2013-07-22 02:59:07 UTC
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 &amp; 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.
Comment 2 Luca Viggiani 2013-07-22 11:32:55 UTC
Hi Nikolay,
overriding msxml3 doesn't change.
Overriding msxml6 Excel says that the file is corrupt and doesn't even open it :(
Comment 3 Luca Viggiani 2013-07-22 11:37:16 UTC
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
Comment 4 Nikolay Sivov 2013-07-22 11:41:11 UTC
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.
Comment 5 Dan Kegel 2013-07-22 16:29:59 UTC
Luca, winetricks is not too clever about handling 64 bit wineprefixes yet.

Does reinstalling in a clean 32 bit wineprefix help, btw?
Comment 6 Luca Viggiani 2013-07-23 01:07:36 UTC
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
Comment 7 Luca Viggiani 2013-07-23 01:23:27 UTC
Actually the installer says "unsupported installation language" when installing office from ISO in wine only
Comment 8 Luca Viggiani 2013-07-23 01:49:45 UTC
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.
Comment 9 Nikolay Sivov 2013-07-23 07:12:40 UTC
Created attachment 45365 [details]
patch

This patch fixes it for me. I still need to write some tests and think if anything will break with it.
Comment 10 Nikolay Sivov 2013-07-31 15:40:42 UTC
This is fixed with b1bf9a62f94f6a6103eba0405ed693d4f8f6a39f.
Comment 11 Alexandre Julliard 2013-08-02 13:19:16 UTC
Closing bugs fixed in 1.7.0.
Comment 12 Maksim Melnikau 2013-11-04 06:30:16 UTC
FYI, World of Tanks launcher was also affected with this bug
Comment 13 Alexandre Julliard 2013-11-15 13:40:48 UTC
Removing 1.6.x milestone from bugs included in 1.6.1.


Privacy Policy
If you have a privacy inquiry regarding this site, please write to [email protected]

Hosted By CodeWeavers