作者hotyigirl (yiju)
看板R_Language
标题[问题] 输出xlsx问题
时间Tue Feb 21 20:48:06 2017
[问题类型]:
经验谘询(我想用R 连接某些资料库,请问大家的经验)
[软体熟悉度]:
入门(写过其他程式,只是对语法不熟悉)
[问题叙述]:
想输出xlsx档案,但R显示错误,不知道是哪里错误?
[程式范例]:
> library(xlsx)
> camerasData <-read.xlsx("cameras.xlsx",sheetIndex=1,header=T)
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.IllegalArgumentException: Your InputStream was neither an OLE2
stream, nor an OOXML stream
程式码可贴於以下网站:
http://ideone.com/
http://codepad.org
http://pastie.org/
http://nopaste.info/
http://pastebin.com/
http://paste.plurk.com
http://gist.github.com/
http://nopaste.csie.org/
[环境叙述]:
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 14393)
locale:
[1] LC_COLLATE=Chinese (Traditional)_Taiwan.950
[2] LC_CTYPE=Chinese (Traditional)_Taiwan.950
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Taiwan.950
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] xlsx_0.5.7 xlsxjars_0.6.1 rJava_0.9-8
loaded via a namespace (and not attached):
[1] tools_3.3.2
[关键字]:
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 1.34.160.33
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/R_Language/M.1487681289.A.8C9.html
2F:→ cywhale: 有些建议是options(java.parameters = "-Xmx1000m") 02/22 09:04
3F:推 f496328mm: 这个是输入xlsx吧? 02/22 17:59
4F:→ f496328mm: 我之前读xlsx可以成功耶 02/22 17:59
5F:→ locka: 原po要不要改用read.xlsx2看看? 02/22 18:02