Bug 92753 - Column width of xlsx are missing in Excel
Summary: Column width of xlsx are missing in Excel
Status: RESOLVED DUPLICATE of bug 100946
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.4.3 release
Hardware: Other Mac OS X (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-15 05:54 UTC by Sugam
Modified: 2016-07-31 21:28 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Column width xlsx (186.22 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2015-07-16 05:27 UTC, Sugam
Details
printscreen from excel2010 (10.44 KB, image/png)
2015-07-16 14:06 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sugam 2015-07-15 05:54:01 UTC
Create a new spreadsheet 4.4.4.3, change the width of some columns and save as xlsx, Open the same in EXCEL MAC 2011 version 14.1.0 column width is the default width.
Comment 1 raal 2015-07-15 18:26:53 UTC
Cannot reproduce with LO Version: 5.1.0.0.alpha1+
Build ID: 3c45bfb0cabf206f6217f1de9eb5cfa12b78e46f
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-07-04_01:25:39 and excel 2010 (tested with empty new file)

Please attach file created in LO 4.4.4.3, Mac OSX.
Comment 2 Sugam 2015-07-16 05:27:19 UTC
Created attachment 117273 [details]
Column width xlsx
Comment 3 Sugam 2015-07-16 05:28:25 UTC
@raal: I have attached the xlsx, try to open the same in EXCEL MAC 2011 version 14.1.0.
Comment 4 raal 2015-07-16 14:06:46 UTC
Created attachment 117281 [details]
printscreen from excel2010

Looks like problem in excel on Mac, in excel 2010 is width identical as in LO.
Comment 5 Alex Thurgood 2015-07-20 08:09:58 UTC
@Sugam :

XLSX file opens with correct width in Excel 15.10.1 for OSX 10.10.4

Not our bug. Please upgrade your version of Excel.
Comment 6 Sugam 2015-07-22 06:38:37 UTC
@Alex Thurgood :

Digged in further and found -

When the files saved as xlsx from LibreOffice are opened in Excel, the Column widths are not proper. All the columns are displayed with default width.

Column xml written by LibreOffice,
<col collapsed="false" hidden="false" max="1" min="1" style="0" width="47.8061224489796"/>
<col collapsed="false" hidden="false" max="2" min="2" style="0" width="2.59183673469388"/>
<col collapsed="false" hidden="false" max="3" min="3" style="0" width="55.4387755102041"/>
<col collapsed="false" hidden="false" max="1025" min="4" style="0" width="11.5204081632653"/


Column xml written by Excel,
<col min="1" max="1" width="55.33203125" style="1" customWidth="1"/>
<col min="2" max="2" width="2.1640625" style="3" customWidth="1"/>
<col min="3" max="3" width="67.83203125" style="2" customWidth="1"/>

LibreOffices misses to write the attribute customWidth="1". If that attribute is added manually to the xml, the file opens with proper width in Excel.
Comment 7 Yousuf Philips (jay) (retired) 2015-09-16 06:39:04 UTC
In excel 2013, i stretch columns A, B and C and here is the xml.

<cols>
<col min="1" max="1" width="21.7109375" customWidth="1"/>
<col min="2" max="2" width="5.85546875" customWidth="1"/>
<col min="3" max="3" width="76.5703125" customWidth="1"/>
</cols>

So i modified that xml and removed the 'customWidth="1"' entries and it still opened fine in excel 2013. Seems Excel Mac 2011 is defaulting this attribute to be 0, while everyone else defaults it to be 1.

And checking < https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column(v=office.14).aspx >, it says customWidth is "Flag indicating that the column width for the affected column(s) is different from the default or has been manually set."

It would be good to add this attribute to get better compatibility.
Comment 8 Bartosz 2016-07-31 21:28:41 UTC

*** This bug has been marked as a duplicate of bug 100946 ***