找回密码
 注册
查看: 2658|回复: 0

R语言 XLConnect包 workbook-class()函数中文帮助文档(中英文对照)

  [复制链接]
发表于 2012-10-1 23:30:44 | 显示全部楼层 |阅读模式
workbook-class(XLConnect)
workbook-class()所属R语言包:XLConnect

                                        Class "workbook"
                                         类“工作簿”

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

This is XLConnect's main entity representing a Microsoft Excel workbook. S4 objects of this class and corresponding methods are used to manipulate the underlying Excel workbook instances.
这是XLConnect的主要实体,Microsoft Excel工作簿。 S4对象的类和相应的方法被用于操纵底层的Excel工作簿的实例。


类对象----------Objects from the Class----------

Objects can be created by calls of the form loadWorkbook(filename, create). This is a shortcut form of new("workbook", filename, create) with some additional error checking.
可以创建对象通过调用的形式loadWorkbook(filename, create)。这是一个快捷的new("workbook", filename, create)一些额外的错误检查。


插槽----------Slots----------




filename: Object of class character which represents the filename of the
filename:对象的类character的文件名




jobj: Object of class jobjRef (see package rJava) which represents a Java object reference that is used
jobj:类的对象jobjRef(见套件“rJava)这是一个Java对象引用使用

These slots should not be accessed directly in user code. workbook objects should only be manipulated via the corresponding methods.
在这些插槽中不应该直接访问用户代码中。 workbook对象应该只被操纵通过相应的方法。


注意----------Note----------

XLConnect supports both Excel 97-2003 (*.xls) and OOXML (Excel 2007+, *.xlsx) file formats.<br><br>
XLConnect支持的Excel 97-2003(*。xls)的OOXML(Excel 2007年+,*的。xlsx)文件格式。参考参考

A workbook's underlying Excel file is not saved (or being created in case the file did not exist and create = TRUE has been specified) unless the saveWorkbook method has been called on the object. This provides more flexibility to the user to decide when changes are saved and also provides better performance in that several changes can be written in one go (normally at the end, rather than  after every operation causing the file to be rewritten again completely each time). This is due to the fact that workbooks are manipulated in-memory and are only written to disk with specifically calling saveWorkbook.
Aworkbook的基础Excel文件不会被保存(或正在建立的情况下,该文件不存在,create = TRUE已指定),除非saveWorkbook方法已在对象上调用。这提供了更大的灵活性,用户来决定何时更改将被保存,也可以写在一个(通常在年底,而不是每次操作后导致文件被完全重新改写,每次在这几个变化提供了更好的性能) 。这是由于这样的事实,工作簿中的操作在内存中,并写入到磁盘中特别呼吁saveWorkbook。


(作者)----------Author(s)----------



Martin Studer<br>
Mirai Solutions GmbH <a href="http://www.mirai-solutions.com">http://www.mirai-solutions.com</a>




参考文献----------References----------

http://en.wikipedia.org/wiki/Office_Open_XML

参见----------See Also----------

loadWorkbook, saveWorkbook
loadWorkbook,saveWorkbook


实例----------Examples----------


# Create a new workbook 'myWorkbook.xlsx' [创建一个新的工作簿myWorkbook.xlsx“]
# (assuming the file to not exist already)[(假设文件不存在)]
wb <- loadWorkbook("myWorkbook.xlsx", create = TRUE)

# Create a worksheet called 'mtcars'[创建一个工作表被称为“mtcars]
createSheet(wb, name = "mtcars")

# Write built-in dataset 'mtcars' to sheet 'mtcars' created above[写内置数据集的mtcars上面创建的表“mtcars]
writeWorksheet(wb, mtcars, sheet = "mtcars")

# Save workbook - this actually writes the file 'myWorkbook.xlsx' to disk[保存工作簿 - 这实际上是该文件的写入myWorkbook.xlsx到磁盘]
saveWorkbook(wb)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-23 23:08 , Processed in 0.022550 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表