Convert XLS to PDF through command line with SinglePageSheets arg

Hi,

I have installed the version LibreOffice 7.6.2.1 and I use the following command to convert XLS files to PDF through the Linux terminal:

soffice -env:UserInstallation=file:///temp/{$USER} --headless --convert-to pdf:calc_pdf_Export:{"SinglePageSheets":{"type":"boolean","value":"true"}} my_file.xls --outdir .

The command works correctly, except when the XLS file is saved in such a way that the initial cells of the page are not visible.

For example, if I save the XLS with cell A40 as the first visible cell, then the PDF file is exported leaving blank all non-visible rows (1:39):

The same happens if I do the export from the UI selecting the “Whole page” checkbox…

Do I need to configure some other option to export the whole page regardless of the visible cells? Is this a bug?

Thank you

See also: tdf#155351

I think this case is the same as mine, and I think the problem is related to the position in which the spreadsheet was last saved.

When I open that excel the cell that appears selected is DG1782, so all the rows and columns below this position are exported blank.

If I select cell A1, save the file, close the file, open it again, export, then it seems to be exported correctly.

So, I guess it’s a bug that hasn’t been fixed yet.

Thank you

Are you sure those first 39 rows are completely blank? I just created a test spreadsheet with the first rows blank and it worked as expected, but if I put in any character into any one of the cells at the top it kept a bunch of whitespace in the output.

I just tested with hiding the first set of empty rows & it generated it as expected.

My spreadsheet does have data in the first 39 rows. In the image I attached in the initial post, in the blank space there should be three tables. These 39 rows are not hidden, they are just not visible because of the scroll down (this was the position of the page when the file was last saved).

The expected behaviour would be to export to PDF the 6 tables (the whole page) regardless of the position of the scroll when opening the file.

Clorine.xlsx (19.3 KB)

Thank you