Created attachment 106890 [details] an example spreadsheet .ods which can be used to export to .xlsx to see the problem Problem description: Export to excel .xlsx does not save lines on secondary axis of line chart. Make a line chart with one line on the primary Y axis and move the second series to the secondary axis. Export to Excel .xlsx. Reopen in LibreOffice. Both lines are on the primary axis. Current behavior: Expected behavior: Secondary axis settings should be preserved. Operating System: All Version: 4.3.2.2 release
I can confirm with LO 4.3.2.2, Win7
Ok, so this requires quite some refactoring in the chart export code. Currently we create a huge mess (including invalid files) when we have such a document. We export one lineChart element with two data series + 3 axIds (which is invalid). Correct would be to export 2 lineChart element with one data series and 2 axIds each with one axis being deleted or pointing to the same x axis. This also needs some tests before it is implemented to make sure that we understand how the secondary x-axis comes into play. Currently I assume that you can get up to 4 lineChart elements depending on these combinations: primary x with primary y, primary x with secondary y, secondary x with primary y, secondary x with secondary y.
*** Bug 85556 has been marked as a duplicate of this bug. ***
I have most of it fixed now. There seem to be a few issues left with the category axis but I have no idea why that happens.
(In reply to Markus Mohrhard from comment #4) > I have most of it fixed now. > > There seem to be a few issues left with the category axis but I have no idea > why that happens. Let's treat the remaining issues as a new bug. I think they are not directly related to my patch. There are a number of issues to the export that show some API issues and the axis handling might need some improvements.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=cffa77304daf2379a056bb2d86fe041e7c98bc52 only export series for same axis into same chart type element, tdf#84347 It will be available in 5.0.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.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=285d5c52f8dc07f15c62ca9698209f6132b91467 add test for tdf#84347 It will be available in 5.0.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.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1573315ec978b7f53a8babeb7ad44e104896209e export each axis only once non-deleted, related tdf#84347 It will be available in 5.0.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.