Created attachment 60059 [details] Landscape A4 page saved by LibO Calc Steps to reproduce: 1. Create new spreadsheet. 2. Go to Format / Page... / Page. 3. Set Landscape page orientation (or exchange dimensions so that width is greater than height). 4. Write anything into the bottom-right cell of the page, marked by the dashed lines. 5. Save in Office Open XML (.xlsx) format. 6. Load the saved file either in LibO or MS Excel. Expected: Conserving landscape page orientation. What happens: Page is reverted to portrait. Note #1: The same thing works perfectly with LibO Writer and the .docx file format. So this is a Calc-only bug. Note #2: This bug may be connected to Bug 40146.
Created attachment 60060 [details] Landscape A4 page saved by MS Excel
*** Bug 49084 has been marked as a duplicate of this bug. ***
I have adjusted the summary since trying to import an landscape formatted xlsx produced by Excel revealed that LibO's import filter also fails to handle landscape format in xlsx.
I've just encountered this using LibreOffice 4.0.3.2 (rc2) on Ubuntu 13.04 Linux (64-bit). When I load a spreadsheet with a landscape page orientation that I created in LibreOffice and saved in Excel 2007/2010 format in LibreOffice, the landscape page orientation is preserved. When I open that same document in Excel 2007 on Windows XP, the page orientation is portrait.
Tested in LibreOffice 4.1.4.2 and 4.2.0.1: 1. New spreadsheet, input something; 2. Set page to landscape; 2. Save as ms-office-2007/2010 (.xlsx); 3. Load in LibreOffice, page is Landscape; 4. Load in MSO 2010, page is Portrait So: LO knows the page is Landscape, but MSO dont know it. Further testing: 5. Set the page as Landscape in MSO, save. 6. Open in LibreOffice, page is Landscape. 7. Do some editing, save, and load in MSO, page is Portrait again. So, LO exported the wrong page orientation info in xlsx.
(In reply to comment #5) > Tested in LibreOffice 4.1.4.2 and 4.2.0.1: > 2. Save as ms-office-2007/2010 (.xlsx); unzip the xlsx file saved by LibreOffice, I found the following in /xl/worksheets/sheet1.xml: <pageSetup blackAndWhite="false" cellComments="none" copies="1" draft="false" firstPageNumber="1" fitToHeight="1" fitToWidth="1" horizontalDpi="300" orientation="landscape" pageOrder="downThenOver" paperSize="9" scale="100" useFirstPageNumber="true" usePrinterDefaults="false" verticalDpi="300"/> > Further testing: > 5. Set the page as Landscape in MSO, save. unzip the xlsx file save by MSO, I found the following in /xl/worksheets/sheet1.xml: <pageSetup paperSize="9" orientation="landscape" useFirstPageNumber="1" horizontalDpi="300" verticalDpi="300" r:id="rId1"/> They are all orientation="landscape", except that xlsx save by LO is much "bigger" (have more xml attributes). So why is it portrait when load in MSO? A MSO bug?
Created attachment 91212 [details] xlsx file saved by LO 4.1.4.2. the page should be landscape, but appears portrait when loaded in MSO 2010.
Created attachment 91213 [details] xlsx file saved by MSO 2010 the page is landscape when loaded in LO or MSO. But when edited by LO and save, it's portrait again when loaded in MSO.
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: *Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later) https://www.libreoffice.org/download/ *If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior *If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT *Update the version field *Reply via email (please reply directly on the bug tracker) *Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for your help! -- The LibreOffice QA Team This NEW Message was generated on: 2015-04-18
Can confirm fixed in Version: 4.4.1.2 Build-ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432 Gebietsschema: de_DE (Tested Linux build.)
This problem still occurs to me using LO Calc 4.4.2 on Windows XP. When I open an Excel 2007 worksheet in LO Calc, it shows the page orientation as landscape. I can save the file in XLSX format ok and when I open it in Excel 2007, the page orientation is portrait. I'll attach my XLSX file and some screen shots.
Created attachment 114918 [details] Excel 2007 Worksheet (XLSX) saved by LO Calc 4.4.2 on Windows XP This is the actual Excel worksheet I saved in LO Calc 4.4.2 on Windows XP.
Created attachment 114919 [details] Screen shot of Excel worksheet in LO Calc 4.4.2 on Windows XP This is a screen shot of the page orientation shown in LO Calc 4.4.2 on Windows XP of the "tom-test.xlsx" file.
Created attachment 114921 [details] Screen shot of Excel worksheet in Excel 2007 on Windows XP This is a screen shot of the "tom-test.xlsx" file as shown in Excel 2007 on Windows XP. This is after I saved a change using LO Calc 4.4.2, on the same system. Notice Excel shows the page orientation as portrait, not landscape.
I have found solution, and created review: https://gerrit.libreoffice.org/#/c/26871/ After save to .xlsx in usePrinterDefaults was added into PageSetup. Due to bug in MS Excel, when usePrinterDefaults is present, (no matter what value), the orientation of the Page is alway "portrait". To resolve that issue, if usePrinterDefaults is set to default value, then usePrinterDefaults XML field is not added during export to .xlsx
Created attachment 126044 [details] Here is the landscape-saved-by-lo-4_1_4.xlsx which was not opening in Excel 2010 correctly, which was resaved by Fixed LO
Created attachment 126045 [details] Here is the landscape-saved-by-mso-2010.xlsx which was not opening in Excel 2010 correctly, which was resaved by Fixed LO
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=46094ff4b0ea06931f2af3fc45d00fd38c3ebf26 tdf#48767 Fix orientation issue after export to .xlsx It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I request this fix be backported to 5.2 version, as this is an important issue which causes formatting loss.
*** Bug 78046 has been marked as a duplicate of this bug. ***
Review for lo-5-2: https://gerrit.libreoffice.org/#/c/28084/
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=dd99a9fd72f73c9d7c1b9ac6754f3d17568af81b&h=libreoffice-5-2 tdf#48767 Fix orientation issue after export to .xlsx (lo-5-2) It will be available in 5.2.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Thank you so much for the perfect fix.
Bartosz Kosiorek committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=91328bab6f47dc9659a2124a73d88ff3d7ba4279&h=libreoffice-5-2 tdf#48767 Fix orientation issue after export to .xlsx It will be available in 5.2.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.