I saw the answer on how to put the header on only the 1st page of a multipage document, but that does not seem to apply to spreadsheets. How do I put the header on only the 1st page of a spreadsheet.
Directly I don’t know any way, but depends on how your data to print are organize, and what you want get, maybe can be possible to find some way to achieve it.
My answer here just adds further detail to what @mariosv has stated i.e., that there is basically no current way to set page styles in Calc with the flexibility available in Writer.
In Writer page styles can be linked via the Next Style setting in the Organizer tab (
style:next-style-name attribute in the XML), such such that (for example) the pre-defined “First Page” page style has a Next Style of the “Default Style” page style. In Calc the same attribute does not appear to be available / implemented even though ODF v1.2, part 1, 19.499, p.509, would seem to indicate that it can be.
Both Writer and Calc make use of the
style:master-page element to define page styles (in
styles.xml) e.g., the “Right Page” page style in an ODT:
<style:master-page style:name="Right_20_Page" style:display-name="Right Page" style:page-layout-name="Mpm2" style:next-style-name="Left_20_Page"> <style:header> <text:p text:style-name="Header"/> </style:header> <style:footer> <text:p text:style-name="Footer"/> </style:footer> </style:master-page>
… and the “Report” page style in an ODS:
<style:master-page style:name="Report" style:page-layout-name="Mpm2"> <style:header> <style:region-left> <text:p> <text:sheet-name>???</text:sheet-name> ( <text:title>???</text:title> ) </text:p> </style:region-left> <style:region-right> <text:p> <text:date style:data-style-name="N2" text:date-value="2014-01-25">00/00/0000</text:date> , <text:time>00:00:00</text:time> </text:p> </style:region-right> </style:header> <style:header-left style:display="false"/> <style:footer> <text:p> Page <text:page-number>1</text:page-number> / <text:page-count>99</text:page-count> </text:p> </style:footer> <style:footer-left style:display="false"/> </style:master-page>
Both point to a master page layout definition (
style:page-layout element), where further details are provided about page, header, and footer layout. In an ODT the master page style is assigned to a paragraph style (in
<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="Right_20_Page"> <style:paragraph-properties style:page-number="auto"/> <style:text-properties officeooo:rsid="001a7102" officeooo:paragraph-rsid="001a7102"/> </style:style>
… while in an ODS the master page style is assigned to a table style (in
<style:style style:name="ta1" style:family="table" style:master-page-name="Report"> <style:table-properties table:display="true" style:writing-mode="lr-tb"/> </style:style>
Hi @Oweng, I think we must take in account how data are managed in Writer or in Calc. In calc more than a page style it is a sheet style, sheets can only have one style, and ranges to print are defined by sheet, so not option to apply different page styles to a different ranges in the same sheet. The limitation seems to me the same in Writer and Calc, in Writer is needed to use two page styles to get this solved.
… But It is possible print two sheets at the same time, so depending on how data are organized and what is wanted to print could be possible reach the target.
@mariosv, yes, I agree. The data arrangement / usage case for Writer and Calc are necessarily different. I thought the View > Page Break Preview mode could be used to allow users to enter page breaks with a Next Style association, but to what degree this is (technically) possible I am unsure.