[英]How to read macro enabled excel files in R?
I have 2 excel files which have macros in it.我有 2 个 excel 文件,里面有宏。 The file extension ends with .xlsb
and .xlsm
.文件扩展名以.xlsb
和.xlsm
结尾。 I want to read these files into R and do exactly what excel is doing with these files in terms of data inputs in R. What is the way to go about it?我想将这些文件读入 R,并根据 R 中的数据输入,准确地执行 excel 对这些文件所做的操作。go 的方法是什么?
For example: if the excel file calculates house prices in sheet 2 based on data input in sheet 1, how can the same results for house price calculation be obtained in R?例如:excel文件根据工作表1输入的数据计算工作表2的房价,那么R怎么能得到同样的房价计算结果呢?
You might take a look at the R package RDCOMClient:你可以看看 R package RDCOMClient:
https://github.com/omegahat/RDCOMClient https://github.com/omegahat/RDCOMClient
Here is a nice example shown:这是一个很好的例子:
https://www.r-bloggers.com/2021/07/rdcomclient-read-and-write-excel-and-call-vba-macro-in-r/ https://www.r-bloggers.com/2021/07/rdcomclient-read-and-write-excel-and-call-vba-macro-in-r/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.