setForceFormulaRecalculation-methods

0th

Percentile

Forcing Excel to recalculate formula values when opening a workbook

This function controls a flag that forces Excel to recalculate formula values when a workbook is opened.

Keywords
methods, utilities
Usage
# S4 method for workbook,character
setForceFormulaRecalculation(object,sheet,value)
# S4 method for workbook,numeric
setForceFormulaRecalculation(object,sheet,value)
Arguments
object

The '>workbook to use

sheet

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.

value

logical specifying if formula recalculation should be forced or not

Details

The arguments sheet and value are vectorized such that multiple worksheets can be controlled with one method call.

Note

A typical use for this flag is forcing Excel into updating formulas that reference cells affected by writeWorksheet or writeNamedRegion. The exact behavior of Excel when the flag is set depends on version and file format.

See Also

'>workbook, getForceFormulaRecalculation

Aliases
  • setForceFormulaRecalculation
  • setForceFormulaRecalculation-methods
  • setForceFormulaRecalculation,workbook,character-method
  • setForceFormulaRecalculation,workbook,numeric-method
Examples
# NOT RUN {
# 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)
# }
Documentation reproduced from package XLConnect, version 0.2-14, License: GPL-3

Community examples

Looks like there are no examples yet.