loadWorkbook(XLConnect)
loadWorkbook()所属R语言包:XLConnect
Loading Microsoft Excel workbooks
装载Microsoft Excel工作簿
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Loads or creates a Microsoft Excel workbook for further manipulation.
加载或创建一个Microsoft Excelworkbook进行进一步的处理。
用法----------Usage----------
loadWorkbook(filename, create = FALSE)
参数----------Arguments----------
参数:filename
Filename (absolute or relative) of Excel workbook to be loaded. Supported are Excel '97 (*.xls) and OOXML (Excel 2007+, *.xlsx) file formats. Paths are expanded using path.expand.
要加载的文件名(绝对或相对)的Excel工作簿。支持Excel的97(*。xls)的OOXML(Excel 2007年+,*的。xlsx)文件格式。路径是扩大使用path.expand。
参数:create
Specifies if the file should be created if it does not already exist (default is FALSE). Note that create = TRUE has no effect if the specified file exists, i.e. an existing file is loaded and not being recreated if create = TRUE.
指定,如果该文件被创建,如果它不存在,(默认是FALSE)。注意create = TRUE有没有影响,如果指定的文件存在,即现有的文件被加载,而不是重新如果create = TRUE。
值----------Value----------
Returns a workbook object for further manipulation.
返回workbook对象进行进一步的处理。
注意----------Note----------
loadWorkbook is basically just a shortcut form of new("workbook", filename, create) with some additional error checking. As such it is the preferred way of creating workbook instances.
loadWorkbook是基本上只是一个快捷方式的形式new("workbook", filename, create)一些额外的错误检查。因此,它是创建“workbook实例的首选方式。
(作者)----------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----------
workbook, saveWorkbook
workbook,saveWorkbook
实例----------Examples----------
# Load existing demo Excel file 'mtcars.xlsx' from the XLConnect package[加载现有的Excel文件演示“mtcars.xlsx从XLConnect包]
wb.mtcars <- loadWorkbook(system.file("demoFiles/mtcars.xlsx",
package = "XLConnect"))
# Create new workbook[创建新的工作簿]
wb.new <- loadWorkbook("myNewExcelFile.xlsx", create = TRUE)
# NOTE: The above statement does not write the file to disk! [注:上面的语句不写入到磁盘上的文件!]
# saveWorkbook(wb.new) would need to be called in order to write/save [将需要以写入/保存saveWorkbook(wb.new)]
# the file to disk![到磁盘上的文件!]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|