@brief Set the horizontal page breaks on a worksheet.
@param worksheet Pointer to a lxw_worksheet instance to be updated.
@param breaks Array of page breaks.
@return A #lxw_error code.
The %worksheet_set_h_pagebreaks() function adds horizontal page breaks to
a worksheet. A page break causes all the data that follows it to be printed
on the next page. Horizontal page breaks act between rows.
The function takes an array of one or more page breaks. The type of the
array data is @ref lxw_row_t and the last element of the array must be 0:
@brief Set the horizontal page breaks on a worksheet.
@param worksheet Pointer to a lxw_worksheet instance to be updated. @param breaks Array of page breaks.
@return A #lxw_error code.
The %worksheet_set_h_pagebreaks() function adds horizontal page breaks to a worksheet. A page break causes all the data that follows it to be printed on the next page. Horizontal page breaks act between rows.
The function takes an array of one or more page breaks. The type of the array data is @ref lxw_row_t and the last element of the array must be 0:
@code lxw_row_t breaks1[] = {20, 0}; // 1 page break. Zero indicates the end. lxw_row_t breaks2[] = {20, 40, 60, 80, 0};
worksheet_set_h_pagebreaks(worksheet1, breaks1); worksheet_set_h_pagebreaks(worksheet2, breaks2); @endcode
To create a page break between rows 20 and 21 you must specify the break at row 21. However in zero index notation this is actually row 20:
@code // Break between row 20 and 21. lxw_row_t breaks[] = {20, 0};
worksheet_set_h_pagebreaks(worksheet, breaks); @endcode
There is an Excel limitation of 1023 horizontal page breaks per worksheet.
Note: If you specify the "fit to page" option via the worksheet_fit_to_pages() function it will override all manual page breaks.