Learn R Programming

DescTools (version 0.99.56)

GetNewXL: Create a New Excel Instance

Description

Start a new instance of Excel and return its handle. This is needed to address the Excel application and objects afterwards.

Usage

GetNewXL(visible = TRUE, newdoc = TRUE)

Arguments

visible

logical, should Excel made visible? Defaults to TRUE.

newdoc

logical, determining if a new workbook should be created. Defaults to TRUE.

Author

Andri Signorell <andri@signorell.net>

Details

Here's a list of some frequently used commands.
Let's assume:

xl <- GetNewXL()
workbooksxl$workbooks()$count()
quit excelxl$quit()

See Also

XLView, XLGetRange, XLGetWorkbook

Examples

Run this code
if (FALSE)  # Windows-specific example
# get a handle to a new excel instance
xl <- GetNewXL()

Run the code above in your browser using DataLab