worksheet_set_v_pagebreaks

@brief Set the vertical 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_v_pagebreaks() function adds vertical page breaks to a worksheet. A page break causes all the data that follows it to be printed on the next page. Vertical page breaks act between columns.

The function takes an array of one or more page breaks. The type of the array data is @ref lxw_col_t and the last element of the array must be 0:

@code lxw_col_t breaks1[] = {20, 0}; // 1 page break. Zero indicates the end. lxw_col_t breaks2[] = {20, 40, 60, 80, 0};

worksheet_set_v_pagebreaks(worksheet1, breaks1); worksheet_set_v_pagebreaks(worksheet2, breaks2); @endcode

To create a page break between columns 20 and 21 you must specify the break at column 21. However in zero index notation this is actually column 20:

@code // Break between column 20 and 21. lxw_col_t breaks[] = {20, 0};

worksheet_set_v_pagebreaks(worksheet, breaks); @endcode

There is an Excel limitation of 1023 vertical 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.

extern (C)
worksheet_set_v_pagebreaks

Meta