R:rJava误差XLSX(0.4.2)包 [英] R: rJava error with xlsx (0.4.2) package
问题描述
我试图使用XLSX包从外部文件填写A S preadsheet的信息。到现在为止,我已经使用addDataFrame()把信息为S preadsheet,以及有关它的一切,我已经尝试已经成功(字体,颜色,边框等)
I am trying to use the xlsx package to fill a spreadsheet with information from an external file. Up until now, I have used addDataFrame() to put information into the spreadsheet, and everything about it that I have tried has been successful (fonts, colors, borders, etc.)
现在的问题是,我需要有超链接的列,要做到这一点,我需要获取或创建特定的细胞(我不知道它,并且都给予同样的错误)。下面code:
The issue now is that I need to have a column of hyperlinks, and to do that I need to get or create the specific cells (I'm not sure which, and both give the same error). The following code:
library(xlsx)
wb = createWorkbook(type="xlsx")
sheet = createSheet(wb, sheetName="InProduction")
createCell(1, 2)
产生错误:
错误.jcall(行[IR],Lorg /阿帕奇/ POI / SS /的usermodel /细胞;,
createCell:RcallMethod:不能确定对象类
Error in .jcall(row[[ir]], "Lorg/apache/poi/ss/usermodel/Cell;", "createCell", : RcallMethod: cannot determine object class
在做一些闲逛之后,我发现它试图调用是的从与调用此API :
After doing some poking around, I found the method it is trying to call is from this API with the call:
minColIx <- .jcall(row[[ir]], "T", "getFirstCellNum")
哪像它应该工作在我看来,但它显然没有。任何人都可以阐明这一些轻?
Which seems to me like it ought to work, but it clearly doesn't. Can anyone shed some light on this?
在此先感谢!
推荐答案
您需要使用创建行 createRow
或 GetRows的
,然后才能创建使用这些列细胞 createCells
。
You need to create rows using createRow
or getRows
before you can create cells in these rows using createCells
.
这篇关于R:rJava误差XLSX(0.4.2)包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!