Skip to contents

Insert page breaks into a worksheet

Usage

wb_add_page_break(wb, sheet = current_sheet(), row = NULL, col = NULL)

Arguments

wb

A workbook object

sheet

A name or index of a worksheet

row, col

Either a row number of column number. One must be NULL

Examples

wb <- wb_workbook()
wb$add_worksheet("Sheet 1")
wb$add_data(sheet = 1, x = iris)

wb$add_page_break(sheet = 1, row = 10)
wb$add_page_break(sheet = 1, row = 20)
wb$add_page_break(sheet = 1, col = 2)

## In Excel: View tab -> Page Break Preview