writeNamedRegionToFile(XLConnect)
writeNamedRegionToFile()所属R语言包:XLConnect
Writing named regions to an Excel file (wrapper function)
编写命名区域Excel文件(包装函数)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Writes named regions to an Excel file.
写入到一个Excel文件命名的区域。
用法----------Usage----------
writeNamedRegionToFile(file, data, name, formula=NA, ...,
styleAction = XLC$STYLE_ACTION.XLCONNECT)
参数----------Arguments----------
参数:file
The path name of the file to write to
路径的文件名写
参数:data
Data to write
要写入的数据
参数:name
Name of the named region to write to
命名区域的名称写
参数:formula
If formula is specified, each item defines the formula of the named region identified by the corresponding entry of name. Use this if you want to create the document from scratch instead of writing to a template!
如果指定了公式,每个项目定义的公式所确定的相应的条目name的命名区域。如果你想从头开始,而不是写模板来创建文档,使用!
参数:...
Additional arguments passed to writeNamedRegion
额外的参数传递给writeNamedRegion
参数:styleAction
Style action to be used when writing the data.<br> The default is XLC$STYLE_ACTION.XLCONNECT. See setStyleAction for more information.
风格的动作时要使用的数据写入。<br>默认为XLC$STYLE_ACTION.XLCONNECT。见setStyleAction更多信息。
(作者)----------Author(s)----------
Thomas Themel<br>
Mirai Solutions GmbH <a href="http://www.mirai-solutions.com">http://www.mirai-solutions.com</a>
参见----------See Also----------
writeNamedRegion, writeWorksheetToFile, readNamedRegionFromFile,<br> readWorksheetFromFile
writeNamedRegion,writeWorksheetToFile,readNamedRegionFromFile,参考readWorksheetFromFile
实例----------Examples----------
# multiregion xlsx file from demoFiles subfolder of package XLConnect[多区域xlsx文件demoFiles子文件夹中的包XLConnect]
demoExcelFile <- system.file("demoFiles/multiregion.xlsx",
package = "XLConnect")
template <- "template-ws.xlsx"
file.copy(demoExcelFile, template)
# Write single data.frame to a named region in an existing file[在现有的文件中写入单个数据框到指定的区域]
writeNamedRegionToFile(template, name = "Iris", iris)
# Write to a new file, defining the sheet and named region as we write.[写一个新的文件,定义表和命名区域,因为我们写的。]
# Format according to XLConnect defaults[格式根据XLConnect默认]
writeNamedRegionToFile("iris.xlsx", name = "Iris", data = iris,
formula = "IrisData!$C$4",
styleAction = "XLCONNECT")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|