无法打开Excel文件中的R语言创建

无法打开Excel文件中的R语言创建

问题描述:

screenshot of error message. The error message text is: "Compile error in hidden module: mdlGlobal. This error commonly occures when code is incompatible with the version, platform, or architecture of this application. Click "Help" for information on how to correct this error.无法打开Excel文件中的R语言创建

我得到的腐败错误,当我尝试打开R. 创建的Excel工作簿,我与两个的.xlsx和.xls的延伸,但既不工作试过!

,我用来做这一切的代码是:

wb <- loadWorkbook("RCreated.xls", create = TRUE); 
saveWorkbook(wb) 
createSheet(wb, name = "First") 

HELP!

+0

如果包含用于创建文件的代码,则诊断问题会更容易。 – jbaums 2014-10-20 07:01:07

+0

是的..谢谢你。我只是添加了代码..这是非常基本的! – LearneR 2014-10-20 07:09:08

+1

有没有理由不能用'write.csv'或'write.table'写一个逗号或制表符分隔的文件?这些可以通过Excel打开,如果您确实需要某种格式的内容,则可以将其另存为.xls/xlsx。 – andybega 2014-10-20 07:10:42

在保存工作簿之前创建工作表。