Skip to contents

wb_open() provides a convenient interface to immediately view the contents of a wbWorkbook object within a spreadsheet application. This function serves as a high-level wrapper for xl_open(), allowing users to inspect the results of programmatic workbook construction without explicitly managing file paths.

Usage

wb_open(wb, interactive = NA, flush = FALSE)

Arguments

wb

A wbWorkbook object to be previewed.

interactive

Logical; determines if the file should be opened. When NA (the default), it inherits the value from base::interactive(). If FALSE, a warning is issued and the file is not opened.

flush

Logical; if TRUE, the flush argument is passed to the internal save call. This controls the XML processing method used when writing the temporary file. For a detailed discussion on the performance and memory implications of this parameter, see wb_save().

Value

The wbWorkbook object, invisibly.

Details

The function operates by creating a temporary copy of the workbook on the local file system and subsequently invoking the system's default handler or a specified spreadsheet application. For users utilizing the R6 interface, wb$open() is available as a shorter alias for this function.

See also