Created attachment 150753 [details]
The attached spreadsheet table was copied from bug 123421's sample, just without pivot table content. The sample is using Calibri font, which is installed on the system.
Save it as XLSX and reopen.
=> The width of the most columns and height of empty rows change.
Original 1st and 2nd column widths: 2.26 cm & 2.76 cm.
XLSX 1st and 2nd column widths: 1.7 cm & 2.76 cm.
Height of 2nd and other empty rows also changes from 0.56 cm to 0.45 cm.
Observed using LO 22.214.171.124.alpha0+ (2e3b0c5d42d60d46cd9f8b8eda9424b095c63418) & 126.96.36.199 / Windows 7.
Looks better in 188.8.131.52.
=> somewhat of a regression
In 184.108.40.206 the column widths in the exported XLSX are 2.22 and 2.73 cm respectively. The row height is still 0.45 cm.
Bibisected the 5.2 -> 5.3 difference to the following commit using repo bibisect-linux-64-5.3. Adding Cc: to Bartosz Kosiorek.
author Bartosz Kosiorek <firstname.lastname@example.org> 2016-07-19 00:26:54 +0200
committer Markus Mohrhard <email@example.com> 2016-07-28 23:23:49 +0200
tdf#100946 Fix width calculation and add customWidth support (.xlsx)
Created attachment 150754 [details]
XLSX exported from ODS
Created attachment 150755 [details]
In Excel the exported sample has:
- 15 row height (uniform),
- 8.43 and 13.43 column widths.
Change the column width and row height
Please attach .xlsx file exported with Calc 220.127.116.11.
The Default column width for MS Office is taken from Default Font size:
In LibreOffice it is explicetely set:
Of course rows height could be easily fixed.
Created attachment 150761 [details]
Sample ODS exported to XLSX with Excel 2016
Created attachment 150774 [details]
Sample ODS exported to XLSX with LO 18.104.22.168
(In reply to Bartosz from comment #4)
> Please attach .xlsx file exported with Calc 22.214.171.124.
Unfortunately I was not able to create such document.
If I create new document with custom cell width and height, it is properly exported by LO and looks ok under Excel and LibreOffice.
Could you please provide instruction how to create such document?
(In reply to Bartosz from comment #7)
> Could you please provide instruction how to create such document?
I used attachment 149245 [details] from bug 123421, which is a pivot table, saving it as XLSX and reloading shows the narrow columns (perhaps that sample is more authentic, I just wanted to get rid of the unnecessary pivot parts).
For the sample attached here I just copied the table, deleted the pivot table, pasted the table in its place, deleted the other pivot-related data and saved it.
(In reply to Aron Budea from comment #8)
> saving it as XLSX and reloading shows the narrow columns
A single narrow column, to be precise.
I'm sorry to jump in, not seeing it's assigned. The patch above would hopefully fix this; still, there's something unusual with the default width handling that I didn't try to closely debug:
Saving it to an Excel format goes through the procedure of defining default width in XclExpColinfoBuffer::Finalize: the most-used width defined as the default. Then (previously to my patch) all the columns with such widths were removed. That is what (properly!) happened with the bug doc; but with hand-made samples, this funnily does not work:
For a simple newly created spreadsheet with two cells with arbitrary content (A1 and B1), and column B having non-default width (all other columns not resized!), the default size is defined from width of column A (equal to width of columns from C and to the end). But immediately then, checking if column A has default width (when removing defaulted columns), returns false! Thus all columns (improperly!) seem "non-default", and all are written to the file, thus not exhibiting the bug.
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":
tdf#124741: export default column width to XLSX
It will be available in 6.3.0.
The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
I will check if this patch has resolved column width issue issue.
Still the height of rows needs to be fixed.
(In reply to Bartosz from comment #12)
> I will check if this patch has resolved column width issue issue.
> Still the height of rows needs to be fixed.
Any update ?
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.
Empty row height still changes when exported to XLSX (width fixed). LO 6.5+.
(In reply to Timur from comment #16)
> Empty row height still changes when exported to XLSX (width fixed). LO 6.5+.
Could you please explain the steps to reproduce it ? Which file are you using ?