在R中使用XLConnect出错:NoSuchMethodError (Java): org.apache.xmlbea



我一直在使用XLConnect包读取r中受密码保护的工作表。最近,在尝试读取文件时出现以下错误。有人熟悉这个错误吗?

Error: NoSuchMethodError (Java): org.apache.xmlbeans.XmlCursor.close()V

会话信息:

R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                           LC_TIME=English_United States.utf8    
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] XLConnect_1.0.6
loaded via a namespace (and not attached):
 [1] compiler_4.2.2  fastmap_1.1.0   cli_3.4.1       htmltools_0.5.3 tools_4.2.2     rstudioapi_0.14 yaml_2.3.6      rmarkdown_2.17 
 [9] knitr_1.40      xfun_0.34       digest_0.6.30   rJava_1.0-6     rlang_1.0.6     evaluate_0.17   fortunes_1.5-4 

我已经更新了XLConnect。

看起来这个问题已经被包开发人员解决了。我尝试了下面的解决方案,它对我很有效。

满线程:https://github.com/miraisolutions/xlconnect/issues/181

具体修复:https://github.com/miraisolutions/xlconnect/issues/181#issuecomment-1299911543

我也有同样的问题。XLConnect版本,但还没有找到任何锻炼。由于我需要完成工作,很可能不得不切换到openxlsx。

最新更新