2012-07-02 20 views
2

我試圖使用XLSX包從一個外部文件填充信息的電子表格。直到現在,我已經使用addDataFrame()將信息放入電子表格中,並且我嘗試過的所有信息都已成功(字體,顏色,邊框等)R:rJava錯誤的XLSX(0.4.2)封裝

現在的問題是我需要有一列超鏈接,並要做到這一點,我需要獲得或創建特定的單元格(我不知道哪些,並給出相同的錯誤)。下面的代碼:

library(xlsx) 
wb = createWorkbook(type="xlsx") 
sheet = createSheet(wb, sheetName="InProduction") 
createCell(1, 2) 

產生錯誤:

Error in .jcall(row[[ir]], "Lorg/apache/poi/ss/usermodel/Cell;", "createCell", : RcallMethod: cannot determine object class

做一些閒逛之後,我發現它正試圖調用該方法是from this API與呼叫:

minColIx <- .jcall(row[[ir]], "T", "getFirstCellNum") 

在我看來,它應該工作,但它顯然沒有。任何人都可以對此有所瞭解嗎?

在此先感謝!

回答

1

您需要使用createRowgetRows創建行,然後才能使用createCells在這些行中創建單元格。