
Last chance! 50% off unlimited learning
Sale ends in
This function controls a flag that forces Excel to recalculate formula values when a workbook is opened.
# S4 method for workbook,character
setForceFormulaRecalculation(object,sheet,value)
# S4 method for workbook,numeric
setForceFormulaRecalculation(object,sheet,value)
The workbook
to use
The name or index of the sheet for which to force formula recalculation.
If sheet = "*"
, the flag is set for all sheets in the workbook
.
logical
specifying if formula recalculation should be forced or not
Thomas Themel
Mirai Solutions GmbH https://mirai-solutions.ch
The arguments sheet
and value
are vectorized such
that multiple worksheets can be controlled with one method call.
workbook
,
getForceFormulaRecalculation
if (FALSE) {
# mtcars xlsx file from demoFiles subfolder of package XLConnect
demoExcelFile <- system.file("demoFiles/mtcars.xlsx", package = "XLConnect")
# Load workbook
wb <- loadWorkbook(demoExcelFile)
# Tell Excel to automatically recalculate formulas on sheet mtcars
setForceFormulaRecalculation(wb, sheet = "mtcars", TRUE)
# The same with a numerical sheet index
setForceFormulaRecalculation(wb, sheet = 1, TRUE)
}
Run the code above in your browser using DataLab