如何读取用 R 加密的 .xls 文件? [英] How to read an .xls file that is encrypted with R?

查看:50
本文介绍了如何读取用 R 加密的 .xls 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常我使用 readxl 包(非常好)来读取 excel 文件:

Typically I use the readxl package (which is quite good) for reading excel files:

 read_excel(path = 'ihateexcel.xls', sheet = 1)

但是,如果我尝试读取加密的 .xls 文件,会话基本上会冻结.显然不想将文件保存为 .csv,因为我会丢失加密或必须使用其他加密.似乎在其他包 xlsx 中也找不到此功能.

However, the session will essentially freeze if I try and read an encrypted .xls file. Obviously don't want to save the file as .csv as I'll lose the encryption or have to use another encryption. Can't seem to find this functionality in other packages xlsx either.

如何读取在 excel 中加密的 .xls 文件?

推荐答案

excel.link 可以帮助您打开受密码保护的文件.

excel.link can help you in opening password protected files.

您可以在其中一个参数中传递您的密码".

You can pass your 'password' in one of the arguments.

使用

xl.read.file(filename, ...... password = NULL)

这篇关于如何读取用 R 加密的 .xls 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆