When exporting an excel to pdf, how can I export it to multiple pages?

If I have an excel with more than 10 columns I want to convert it on 2 pages. Or to set the option to convert 10 columns per page.

I used this:
soffice --convert-to pdf --outdir /destination/path /source/path/file.xlsx

--convert-to (and other command line options) are not expected to try to change document formatting in any way. They use whatever settings there are in the document. Their idea is “create a copy (possibly in a different format) that is as close to original as we can”.

Number of output pages, or how many columns fit on a page, is just one of the formatting settings of a spreadsheet. Thus, this is exactly the example of the things that should not be affected by the command line tools. You need to change the format by other means, e.g. in GUI, or using macros (and then you may design a macro that would open documents, re-format as you need, export, and close - i.e., completely substitute the command line operation).

I see. This great! Thank you!

Can you tell me as well how to develop a proper macro for my use case? I looked everywhere online but I just can’t find a good tutorial on how to approach this.

Look at How to run a single macro for all excel files as a starting point :slight_smile:

Note that that macro is not to export to a different format, but to modify the original files. You would need to replace the storeSelf there with exporting to PDF, to avoid changing originals.