R6 class for a Workbook Worksheet
R6 class for a Workbook Worksheet
The wbWorksheet
object
sheetPr
sheetPr
dimension
dimension
sheetViews
sheetViews
sheetFormatPr
sheetFormatPr
sheet_data
sheet_data
cols_attr
cols_attr
autoFilter
autoFilter
mergeCells
mergeCells
conditionalFormatting
conditionalFormatting
dataValidations
dataValidations
freezePane
freezePane
hyperlinks
hyperlinks
sheetProtection
sheetProtection
pageMargins
pageMargins
pageSetup
pageSetup
headerFooter
headerFooter
rowBreaks
rowBreaks
colBreaks
colBreaks
drawing
drawing
legacyDrawing
legacyDrawing
legacyDrawingHF
legacyDrawingHF
oleObjects
oleObjects
tableParts
tableParts
extLst
extLst
cellWatches
cellWatches
controls
controls
customProperties
customProperties
customSheetViews
customSheetViews
dataConsolidate
dataConsolidate
drawingHF
drawingHF
ignoredErrors
ignoredErrors
phoneticPr
phoneticPr
picture
picture
printOptions
printOptions
protectedRanges
protectedRanges
scenarios
scenarios
sheetCalcPr
sheetCalcPr
smartTags
smartTags
sortState
sortState
webPublishItems
webPublishItems
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
)
gridLines
gridLines
rowColHeaders
rowColHeaders
tabSelected
tabSelected
tabColour
tabColour
zoom
zoom
oddHeader
oddHeader
oddFooter
oddFooter
evenHeader
evenHeader
evenFooter
evenFooter
firstHeader
firstHeader
firstFooter
firstFooter
paperSize
paperSize
orientation
orientation
hdpi
hdpi
vdpi
vdpi
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_df
the 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
)
numbers
remove all numbers
characters
remove all characters
styles
remove all styles
merged_cells
remove all merged_cells
The wbWorksheetObject
, invisibly
add_page_break()
add page break
wbWorksheet$add_page_break(row = NULL, col = NULL)
row
row
col
col
append()
append a field. Intended for internal use only. Not guaranteed to remain a public method.
wbWorksheet$append(field, value = NULL)
field
a field name
value
a new value
The wbWorksheetObject
, invisibly
add_sparklines()
add sparkline
wbWorksheet$add_sparklines(sparklines)
sparklines
sparkline created by create_sparkline()
The wbWorksheetObject
, invisibly
clone()
The objects of this class are cloneable with this method.
wbWorksheet$clone(deep = FALSE)
deep
Whether to make a deep clone.
A Worksheet