I am running R version 3.5.0
I have installed the packages:
install.packages("DescTools")
install.packages("RDCOMClient", repos = "http://www.omegahat.net/R")
I have run Excel and selected a range of values.
Then I run this code in RStudio:
library(DescTools)
BMI <- XLGetRange(header=TRUE)
I get this error message:
Loading required namespace: RDCOMClient
Error in sel$Cells() : attempt to apply non-function
When I run this code:
BMI <- XLGetRange(file="C:/Users/path/Excel to R.xlsx", sheet = "Sheet1", range="A1:B21")
It works fine.
There is an error in importing data from Excel where you select a range in a running Excel Application.
Help would be appreciated in solving this problem.