Learn R Programming

openxlsx2 (version 0.8)

wb_set_sheetview: add sheetview

Description

add sheetview

Usage

wb_set_sheetview(
  wb,
  sheet = current_sheet(),
  color_id = NULL,
  default_grid_color = NULL,
  right_to_left = NULL,
  show_formulas = NULL,
  show_grid_lines = NULL,
  show_outline_symbols = NULL,
  show_row_col_headers = NULL,
  show_ruler = NULL,
  show_white_space = NULL,
  show_zeros = NULL,
  tab_selected = NULL,
  top_left_cell = NULL,
  view = NULL,
  window_protection = NULL,
  workbook_view_id = NULL,
  zoom_scale = NULL,
  zoom_scale_normal = NULL,
  zoom_scale_page_layout_view = NULL,
  zoom_scale_sheet_layout_view = NULL,
  ...
)

Value

The wbWorksheetObject, invisibly

Arguments

wb

workbook

sheet

sheet

color_id, default_grid_color

Integer: A color, default is 64

right_to_left

Logical: if TRUE column ordering is right to left

show_formulas

Logical: if TRUE cell formulas are shown

show_grid_lines

Logical: if TRUE the worksheet grid is shown

show_outline_symbols

Logical: if TRUE outline symbols are shown

show_row_col_headers

Logical: if TRUE row and column headers are shown

show_ruler

Logical: if TRUE a ruler is shown in page layout view

show_white_space

Logical: if TRUE margins are shown in page layout view

show_zeros

Logical: if FALSE cells containing zero are shown blank if !showFormulas

tab_selected

Integer: zero vector indicating the selected tab

top_left_cell

Cell: the cell shown in the top left corner / or top right with rightToLeft

view

View: "normal", "pageBreakPreview" or "pageLayout"

window_protection

Logical: if TRUE the panes are protected

workbook_view_id

integer: Pointing to some other view inside the workbook

zoom_scale, zoom_scale_normal, zoom_scale_page_layout_view, zoom_scale_sheet_layout_view

Integer: the zoom scale should be between 10 and 400. These are values for current, normal etc.

...

additional arguments

Examples

Run this code
wb <- wb_workbook()$add_worksheet()

wb$set_sheetview(
  zoomScale = 75,
  rightToLeft = FALSE,
  showFormulas = TRUE,
  showGridLines = TRUE,
  showOutlineSymbols = FALSE,
  showRowColHeaders = TRUE,
  showRuler = TRUE,
  showWhiteSpace = FALSE,
  tabSelected = 1,
  topLeftCell = "B1",
  view = "normal",
  windowProtection = TRUE
)

Run the code above in your browser using DataLab