Calc won't export all sheets

I have an .ods file containing 12 sheets. I created it in 2017 and have returned to it every year since. It works fine, except that Calc has always refused to export (to PDF) or print all 12 sheets. It gives me only 4, arbitrarily selected as far as I can tell, always the same four. The same thing happens whether I export or print, and whether I specify all, a page range or a selection (when I’ve tried to select all sheets).
It only happens with this file – older, similar files work fine. If the file is corrupted, how can I tell, and can I fix it?

Try to select all sheets (click the first sheet tab and hold down the Shift key while clicking the last sheet tab). Now choose Format - Print Ranges - Clear and try export again

@JohnSUN

Please consider reposting this as an answer, since OP states that it solves their problem.

Ah, that helps! Many thanks! Export works correctly now. I didn’t know about Format - Print Ranges - Clear. What exactly does that do? Doesn’t look like it should be necessary, if I use the obvious controls to export or print.

You can use print ranges to print only a part of the page or only the sheet with the results, not the 200 pages of raw data.

If your printer is at your place you can stop the job, but if your big, loud and quick printer is in another room, there will always be somebody to print the whole file.

J.

To print or export to PDF individual parts of your large spreadsheet, select each of them and choose Format - Print Ranges - Add.

If after a while you need to print other parts, add them to Print Ranges too, or - much easier - clear the previously added (use Format - Print Ranges - Clear for each sheet or for all at once).