gdemin / excel.link

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

R 4.0 Aborts when reading password protected workbook #23

Closed bradSchrage closed 2 years ago

bradSchrage commented 4 years ago

When opening any Microsoft 97-2003 worksheet that is password protected with xl.read.file(), R aborts with a fatal error. I've updated packags

There is an error when updating XLConnectJars stating that it is not available in R 4.0 and I wonder if that is the issue.

library(XLConnectJars) Error: package or namespace load failed for ‘XLConnectJars’: package ‘XLConnectJars’ was installed before R 4.0.0: please re-install it install.packages('XLConnectJars') Installing package into ‘C:/Users//Documents/R/win-library/4.0’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘XLConnectJars’ is not available (for R version 4.0.0)

gdemin commented 4 years ago

XLConnect absolutely different package and works completely independent from excel.link. Could you run the following code:

library(excel.link)
xl[a1]

Will it work without errors?

bradSchrage commented 4 years ago

Sorry @gdemin , you are correct XLConnect is entirely different. I have a script that uses both. excel.link is what I use to open the ".xls" files in the batch.

When I run the script above to test, my R session aborts. I had no problems with R 3.6, but after updating to R 4.0, this no longer works.

gdemin commented 4 years ago

I upgraded my system to R4.0 and reproduce this issue. It seem there is an incompatibility with new R. I will try to fix it as soon as possible.

drcox633 commented 3 years ago

@gdemin

Have you been able to see this resolved yet? I find myself in a similar problem where I am trying to save an encrypted file: xl.save.file(iris,"iris.xlsx", password = "pass")

and I get a fatal error, or when I am trying to read in a different file: test_prot_df <- xl.read.file("file.xlsx", password = "mypassword")

Either way whenever I am using any function from the package on a password protected workbook it throws an error and crashes. I am currently using the R version 4.0.2 (2020-06-22) on a windows 10

gdemin commented 3 years ago

@drcox633 This is issue #24. By now I don't know how to fix it and wait for updated version of the RDCOMClient version.

mrbeachgrove commented 3 years ago

Any news on this issue?

gdemin commented 3 years ago

@mrbeachgrove

Any news on this issue?

There is fork of RDCOMClient which fixes this issue - https://github.com/BSchamberger/RDCOMClient I try to integrate it in the excel.link but currently it don't even compile on my system.

gdemin commented 2 years ago

It seems bug was fixed with version 0.9.10 at 2021-11-02