PivotOpenXlsxRenderer | R Documentation |
The 'PivotOpenXlsxRenderer' class creates a representation of a pivot table in an Excel file using the 'openxlsx' package. See the "Excel Export" vignette for details and examples.
R6Class
object.
new()
Create a new 'PivotOpenXlsxRenderer' object.
PivotOpenXlsxRenderer$new(parentPivot)
parentPivot
The pivot table that this 'PivotOpenXlsxRenderer' instance belongs to.
A new 'PivotOpenXlsxRenderer' object. An internal method used when rendering a pivot table to HTML. Clear the IsRendered flags that exist on the 'PivotDataGroup' class.
clearIsRenderedFlags()
PivotOpenXlsxRenderer$clearIsRenderedFlags()
No return value.
writeToCell()
Writes a value to a cell and applies styling as needed.
PivotOpenXlsxRenderer$writeToCell( wb = NULL, wsName = NULL, rowNumber = NULL, columnNumber = NULL, value = NULL, applyStyles = TRUE, baseStyleName = NULL, style = NULL, mapFromCss = TRUE, mergeRows = NULL, mergeColumns = NULL )
wb
A 'Workbook' object representing the Excel file being written to.
wsName
A character value specifying the name of the worksheet to write to.
rowNumber
An integer value specifying the row number of the cell to write to.
columnNumber
An integer value specifying the column number of the cell to write to.
value
The value to write into the cell.
applyStyles
Default 'TRUE' to write styling information to the cell.
baseStyleName
A character value specifying a named style defined in the pivot table.
style
A 'PivotStyle' object containing CSS style declarations to override the base style.
mapFromCss
Default 'TRUE' to automatically convert CSS style declarations to their Excel equivalents.
mergeRows
An integer vector specifying the row extent of a merged cell.
mergeColumns
An integer vector specifying the column extent of a merged cell.
No return value.
writeToWorksheet()
Write the pivot table into the specified workbook and worksheet at the specified row-column location.
PivotOpenXlsxRenderer$writeToWorksheet( wb = NULL, wsName = NULL, topRowNumber = NULL, leftMostColumnNumber = NULL, outputHeadingsAs = "formattedValueAsText", outputValuesAs = "rawValue", applyStyles = TRUE, mapStylesFromCSS = TRUE, exportOptions = NULL, showRowGroupHeaders = FALSE )
wb
A 'Workbook' object representing the Excel file being written to.
wsName
A character value specifying the name of the worksheet to write to.
topRowNumber
An integer value specifying the row number in the Excel worksheet to write the pivot table.
leftMostColumnNumber
An integer value specifying the column number in the Excel worksheet to write the pivot table.
outputHeadingsAs
Must be one of "rawValue", "formattedValueAsText" (default) or "formattedValueAsNumber" to specify how data groups are written into the Excel sheet.
outputValuesAs
Must be one of "rawValue" (default), "formattedValueAsText" or "formattedValueAsNumber" to specify how cell values are written into the Excel sheet.
applyStyles
Default 'TRUE' to write styling information to the cell.
mapStylesFromCSS
Default 'TRUE' to automatically convert CSS style declarations to their Excel equivalents.
exportOptions
A list of additional export options - see the "A1. Appendix" for details.
showRowGroupHeaders
Default 'FALSE', specify 'TRUE' to write row group headers.
No return value.
clone()
The objects of this class are cloneable with this method.
PivotOpenXlsxRenderer$clone(deep = FALSE)
deep
Whether to make a deep clone.
# This class should only be created by the pivot table.
# It is not intended to be created outside of the pivot table.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.