Learn R Programming

openxlsx2 (version 0.7)

wb_set_sheetview: add sheetview

Description

add sheetview

Usage

wb_set_sheetview(
  wb,
  sheet = current_sheet(),
  colorId = NULL,
  defaultGridColor = NULL,
  rightToLeft = NULL,
  showFormulas = NULL,
  showGridLines = NULL,
  showOutlineSymbols = NULL,
  showRowColHeaders = NULL,
  showRuler = NULL,
  showWhiteSpace = NULL,
  showZeros = NULL,
  tabSelected = NULL,
  topLeftCell = NULL,
  view = NULL,
  windowProtection = NULL,
  workbookViewId = NULL,
  zoomScale = NULL,
  zoomScaleNormal = NULL,
  zoomScalePageLayoutView = NULL,
  zoomScaleSheetLayoutView = NULL
)

Value

The wbWorksheetObject, invisibly

Arguments

wb

workbook

sheet

sheet

colorId, defaultGridColor

Integer: A color, default is 64

rightToLeft

Logical: if TRUE column ordering is right to left

showFormulas

Logical: if TRUE cell formulas are shown

showGridLines

Logical: if TRUE the worksheet grid is shown

showOutlineSymbols

Logical: if TRUE outline symbols are shown

showRowColHeaders

Logical: if TRUE row and column headers are shown

showRuler

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

showWhiteSpace

Logical: if TRUE margins are shown in page layout view

showZeros

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

tabSelected

Integer: zero vector indicating the selected tab

topLeftCell

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

view

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

windowProtection

Logical: if TRUE the panes are protected

workbookViewId

Interger: Pointing to some other view inside the workbook

zoomScale, zoomScaleNormal, zoomScalePageLayoutView, zoomScaleSheetLayoutView

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

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