gdemin / excel.link

Convenient Data Exchange between R and Microsoft Excel
56 stars 16 forks source link

getting full path to open workbooks #7

Closed randomee closed 7 years ago

randomee commented 7 years ago

Is there a way for xl.workbooks() to return the full path to the open workbooks?

gdemin commented 7 years ago

I will add it in the next version. By now you can use quick workaround:

# define function
xl.fullnames = function(){
    workbooks_ref =  xl()[["workbooks"]]
    sapply(seq_len(workbooks_ref[["count"]]), function(i) workbooks_ref[[i]][["fullname"]])
}

# get full names of the open workbooks
xl.fullnames()
randomee commented 7 years ago

Thanks!

gdemin commented 7 years ago

Argument full.names was added to xl.workbooks in the version 0.9.7.