R6 class for a Workbook Worksheet
R6 class for a Workbook Worksheet
The wbWorksheet
object
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
relships
relships
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(
tabColor = NULL,
oddHeader = NULL,
oddFooter = NULL,
evenHeader = NULL,
evenFooter = NULL,
firstHeader = NULL,
firstFooter = NULL,
paperSize = 9,
orientation = "portrait",
hdpi = 300,
vdpi = 300,
printGridLines = FALSE
)
tabColor
tabColor
oddHeader
oddHeader
oddFooter
oddFooter
evenHeader
evenHeader
evenFooter
evenFooter
firstHeader
firstHeader
firstFooter
firstFooter
paperSize
paperSize
orientation
orientation
hdpi
hdpi
vdpi
vdpi
printGridLines
printGridLines
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
merge_cells()
Set cell merging for a sheet
wbWorksheet$merge_cells(rows = NULL, cols = NULL)
rows, cols
Row and column specifications.
The wbWorkbook
object, invisibly
unmerge_cells()
Removes cell merging for a sheet
wbWorksheet$unmerge_cells(rows = NULL, cols = NULL)
rows, cols
Row and column specifications.
The wbWorkbook
object, invisibly
clean_sheet()
clean sheet (remove all values)
wbWorksheet$clean_sheet(
dims = NULL,
numbers = TRUE,
characters = TRUE,
styles = TRUE,
merged_cells = TRUE
)
dims
dimensions
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
set_print_options()
add print options
wbWorksheet$set_print_options(
gridLines = NULL,
gridLinesSet = NULL,
headings = NULL,
horizontalCentered = NULL,
verticalCentered = NULL
)
gridLines
gridLines
gridLinesSet
gridLinesSet
headings
If TRUE prints row and column headings
horizontalCentered
If TRUE the page is horizontally centered
verticalCentered
If TRUE the page is vertically centered
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
set_sheetview()
add sheetview
wbWorksheet$set_sheetview(
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
)
colorId
colorId
defaultGridColor
defaultGridColor
rightToLeft
rightToLeft
showFormulas
showFormulas
showGridLines
showGridLines
showOutlineSymbols
showOutlineSymbols
showRowColHeaders
showRowColHeaders
showRuler
showRuler
showWhiteSpace
showWhiteSpace
showZeros
showZeros
tabSelected
tabSelected
topLeftCell
topLeftCell
view
view
windowProtection
windowProtection
workbookViewId
workbookViewId
zoomScale
zoomScale
zoomScaleNormal
zoomScaleNormal
zoomScalePageLayoutView
zoomScalePageLayoutView
zoomScaleSheetLayoutView
zoomScaleSheetLayoutView
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