write.xls {xlsReadWrite}R Documentation

Write Excelfiles

Description

Saves a data.frame, matrix or vector as an Excelfile. The supported file format is BIFF8, i.e. Excel 97-2003.

Usage

write.xls( x, file, 
           colNames = TRUE, 
           sheet = 1, 
           from = 1, 
           rowNames = NA )

Arguments

x data to be written. A data.frame or a matrix/vector of type double, integer, logical or character.
file the name of the file. If it does not contain an absolute path, the file name is relative to the current working directory.
colNames a character vector or TRUE to write a title row in the spreadsheet.
sheet to write to. A case sensitive character string or a number.
from specifies the starting row to write to.
rowNames a character vector with the actual row names or TRUE to to write row names into the first Excel column.
With NA) the first column will be considered to receive the row names if the first entry in the character vector or the rownames() of the data is not 1.

Details

New files are based on the template TemplateNew.xls which is located in the same folder as the DLL (R_HOME/library/xlsReadWrite/libs/xlsReadWrite.dll) or in the application data folder <APPDATA>\Treetron\xlsReadWrite. If both templates exists, the one in the application data folder has priority.

The arguments colNames and/or colClasses can optionally include an entry for the rownames column (which will be discarded).

Pro version

While the free version should be sufficient for most day-to-day duties, you have the opportunity to choose a more powerful pro version and at the same time support our development and maintenance effort. Additional features of xlsReadWritePro:
- work with data area subsets, - use (named) ranges and pick individual cells, - work with sheets (copy, rename, delete), - read/write formula values, - insert images, - use oleDateTime classes and many datetime helper functions, - append data to existing files and - work with in-memory objects (e.g. to compose Excel reports).

The trial (http://treetron.googlepages.com) is free and the two versions can easily be switched and coexist just fine. So, why not check it out for yourself?

Author(s)

Hans-Peter Suter

See Also

read.xls, write.table


[Package xlsReadWrite version 1.3.2 Index]