To reproduce: 1. Create two worksheets in LibreOffice Calc. 2. Add some content to both worksheets. 3. Select the second worksheet. 4. Click File > Export, type foo.png, click Save, and click OK. The resulting file is an image of the first worksheet, when it should be an image of the second worksheet (which was selected). Checking the box to export only the currently selected cells makes no difference. Essentially, I'm asking for PNG export to work the same as exporting a PDF of the current page. The problem is centered around DocumentToGraphicRenderer::getCurrentPageWriter, which always returns 1 for spreadsheets regardless of which worksheet is selected. See: https://cgit.freedesktop.org/libreoffice/core/tree/filter/source/graphic/GraphicExportFilter.cxx?id=d3bf12ecb743fc0d20e0be0c58ca359301eb705f#n105 https://cgit.freedesktop.org/libreoffice/core/tree/svtools/source/filter/DocumentToGraphicRenderer.cxx?id=d3bf12ecb743fc0d20e0be0c58ca359301eb705f#n148 I finally worked around the problem by copying and pasting cells into GIMP.
it seems you're using an old version of LibreOffice. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
LibreOffice 5.3.0.3 still has this bug.
LO 5.3.4.2 still has the bug. I have spent endless hours today trying to workaround it.
(In reply to Alex Henrie from comment #0) > Essentially, I'm asking for PNG export to work the same as exporting a PDF > of the current page. Actually not, because PDF export exports a series of pages of the currently selected sheet (if selected sheet was requested). You quite certainly do not want that with PNG. > The problem is centered around > DocumentToGraphicRenderer::getCurrentPageWriter, which always returns 1 for > spreadsheets regardless of which worksheet is selected. Unrelated. That's the page writer in the currently setup what-is-to-be-exported range. Your problem is rather that the "Selection only" does not lead to the currently active sheet or the current cell selection, but always the first sheet. https://cgit.freedesktop.org/libreoffice/core/commit/?id=a7a99a574660fc62a9514b2ed3f8ddfe8ad8540c should fix that on master. There's more ongoing work for PNG export, see bug 108317, which is the current tracker for these problems. Other than that, for the "export current page" this is a duplicate of bug 97213. *** This bug has been marked as a duplicate of bug 97213 ***