rexceldesctools

Fetch data from an open excel sheet into R?


I am wondering is it possible to read an excel file that is currently open, and capture things you manually test into R?

I have an excel file opened (in Windows). In my excel, I have connected to a SSAS cube. And I do some manipulations using PivotTable Fields (like changing columns, rows, and filters) to understand the data. I would like to import some of the results I see in excel into R to create a report. (I mean without manually copy/paste the results into R or saving excel sheets to read them later). Is this a possible thing to do in R?

UPDATE

I was able to find an answer. Thanks to awesome package created by Andri Signorell.

library(DescTools)
fxls<-GetCurrXL()
tttt<-XLGetRange(header=TRUE)

Solution

  • I was able to find an answer. Thanks to awesome package created by Andri Signorell.

    library(DescTools)
    fxls<-GetCurrXL()
    tttt<-XLGetRange(header=TRUE)