Skip to contents

Add a Freeze pane in a worksheet.

Usage

wb_freeze_pane(
  wb,
  sheet = current_sheet(),
  first_active_row = NULL,
  first_active_col = NULL,
  first_row = FALSE,
  first_col = FALSE,
  ...
)

Arguments

wb

A workbook object

sheet

A name or index of a worksheet

first_active_row

Top row of active region

first_active_col

Furthest left column of active region

first_row

If TRUE, freezes the first row (equivalent to first_active_row = 2)

first_col

If TRUE, freezes the first column (equivalent to first_active_col = 2)

...

additional arguments

Examples

## Create a new workbook
wb <- wb_workbook("Kenshin")

## Add some worksheets
wb$add_worksheet("Sheet 1")
wb$add_worksheet("Sheet 2")
wb$add_worksheet("Sheet 3")
wb$add_worksheet("Sheet 4")

## Freeze Panes
wb$freeze_pane("Sheet 1", first_active_row = 5, first_active_col = 3)
wb$freeze_pane("Sheet 2", first_col = TRUE) ## shortcut to first_active_col = 2
wb$freeze_pane(3, first_row = TRUE) ## shortcut to first_active_row = 2
wb$freeze_pane(4, first_active_row = 1, first_active_col = "D")