R6 class for a Workbook Worksheet
R6 class for a Workbook Worksheet
The wbWorksheet object
sheetPrsheetPr
dimensiondimension
sheetViewssheetViews
sheetFormatPrsheetFormatPr
sheet_datasheet_data
cols_attrcols_attr
autoFilterautoFilter
mergeCellsmergeCells
conditionalFormattingconditionalFormatting
dataValidationsdataValidations
freezePanefreezePane
hyperlinkshyperlinks
sheetProtectionsheetProtection
pageMarginspageMargins
pageSetuppageSetup
headerFooterheaderFooter
rowBreaksrowBreaks
colBreakscolBreaks
drawingdrawing
legacyDrawinglegacyDrawing
legacyDrawingHFlegacyDrawingHF
oleObjectsoleObjects
tablePartstableParts
extLstextLst
cellWatchescellWatches
controlscontrols
customPropertiescustomProperties
customSheetViewscustomSheetViews
dataConsolidatedataConsolidate
drawingHFdrawingHF
ignoredErrorsignoredErrors
phoneticPrphoneticPr
picturepicture
printOptionsprintOptions
protectedRangesprotectedRanges
scenariosscenarios
sheetCalcPrsheetCalcPr
smartTagssmartTags
sortStatesortState
webPublishItemswebPublishItems
new()Creates a new wbWorksheet object
wbWorksheet$new(
  gridLines = TRUE,
  rowColHeaders = TRUE,
  tabSelected = FALSE,
  tabColour = NULL,
  zoom = 100,
  oddHeader = NULL,
  oddFooter = NULL,
  evenHeader = NULL,
  evenFooter = NULL,
  firstHeader = NULL,
  firstFooter = NULL,
  paperSize = 9,
  orientation = "portrait",
  hdpi = 300,
  vdpi = 300
)gridLinesgridLines
rowColHeadersrowColHeaders
tabSelectedtabSelected
tabColourtabColour
zoomzoom
oddHeaderoddHeader
oddFooteroddFooter
evenHeaderevenHeader
evenFooterevenFooter
firstHeaderfirstHeader
firstFooterfirstFooter
paperSizepaperSize
orientationorientation
hdpihdpi
vdpivdpi
a wbWorksheet object
get_prior_sheet_data()Get prior sheet data
wbWorksheet$get_prior_sheet_data()A character vector of xml
get_post_sheet_data()Get post sheet data
wbWorksheet$get_post_sheet_data()A character vector of xml
unfold_cols()unfold <cols ..> node to dataframe. <cols><col ..> are compressed.
Only columns with attributes are written to the file. This function
unfolds them so that each cell beginning with the "A" to the last one
found in cc gets a value.
TODO might extend this to match either largest cc or largest col. Could
be that "Z" is formatted, but the last value is written to "Y".
TODO might replace the xml nodes with the data frame?
wbWorksheet$unfold_cols()The column data frame
fold_cols()fold the column dataframe back into a node.
wbWorksheet$fold_cols(col_df)col_dfthe column data frame
The wbWorksheetObject, invisibly
clean_sheet()clean sheet (remove all values)
wbWorksheet$clean_sheet(
  numbers = TRUE,
  characters = TRUE,
  styles = TRUE,
  merged_cells = TRUE
)numbersremove all numbers
charactersremove all characters
stylesremove all styles
merged_cellsremove all merged_cells
The wbWorksheetObject, invisibly
add_page_break()add page break
wbWorksheet$add_page_break(row = NULL, col = NULL)rowrow
colcol
append()append a field. Intended for internal use only. Not guaranteed to remain a public method.
wbWorksheet$append(field, value = NULL)fielda field name
valuea new value
The wbWorksheetObject, invisibly
add_sparklines()add sparkline
wbWorksheet$add_sparklines(sparklines)sparklinessparkline created by create_sparkline()
The wbWorksheetObject, invisibly
clone()The objects of this class are cloneable with this method.
wbWorksheet$clone(deep = FALSE)deepWhether to make a deep clone.
A Worksheet