Closed rdinter-usda closed 4 months ago
I have same issue trying to install after updating to R 4.3.2 :(
@rdinter-usda @MrNoClue Facing the same issue with R version 4.3.1. Is there any solution you came across until now?
A 'solution' that worked, was that I got the folder with the "RDCOMClient" from another person, that had it installed on what I presume earlier version of R. With this I just put it in the library where packges are in my file explorer - launched R and loaded the package.
RDCOMClient.zip This one worked for me, try at own risk.
Ok, here's the deal - I tried on my local PC env (win 11) to do the same thing. I am using:
- R v4.3.1
- RStudio v2023.12.1 Build 402
both the latest versions of themself.
There is a other way and that is to install it from git. To make it work You need to install additional packages and tool(s) - here are the commands (in RStudio):
library("devtools")
install_github("omegachat/RDCOMClient")
Which will prompt RStudio to Windows to install RTools that are needed. After that I created a simple test.xlsx file with the password "test1234" and some dummy content:
a1 a2 a3
b1 b2 b3
c1 c2 c3
After that I added the code from the SO:
library(RDCOMClient)
xlApp <- COMCreate("Excel.Application")
xlWbk1 <- xlApp$Workbooks()$Open("C:/Users/Antonio/Desktop/text.xlsx", Password = "test1234") # note that for the path is / in Windows
xlWbk1$sheets(1)$cells(1,1)$value()
Which prints
"1a"
Hope it helps.
Terrific. Thank @adelivuk. It is a non-trivial effort for me to spin-up an up-to-date Window's environment, but as adelivuk shows, it is really quite simple to build this package from the source version. Should building from source in this way fail, I am happy to dig into the code and fix it, but it has installed from source for many, many years in this simple way as far as I am aware. Thanks again @adelivuk
I can now confirm that devtools::install_github("omegahat/RDCOMClient")
will install the package. I had other issues with rtools that stopped this from working for me but now that's cleared away.
Attempting to install on a 4.3 version of R returns these errors:
I can see that https://www.omegahat.net/R/bin/windows/contrib/4.2/PACKAGES exists but not the 4.3 equivalent. Is there plans to support R 4.3? Or a way to install onto 4.3 based on the 4.2 version of RDCOMClient?