is.DataFormat

0th

Percentile

Create an DataFormat object.

Create an DataFormat object, useful when working with cell styles.

Usage
is.DataFormat(df)

DataFormat(x)

Arguments
df

An DataFormat object, as returned by DataFormat.

x

a character value specifying the data format.

Details

Specifying the dataFormat argument allows you to format the cell. For example, "#,##0.00" corresponds to using a comma separator for powers of 1000 with two decimal places, "m/d/yyyy" can be used to format dates and is the equivalent of 's MM/DD/YYYY format. To format datetimes use "m/d/yyyy h:mm:ss;@". To show negative values in red within parantheses with two decimals and commas after power of 1000 use "#,##0.00_);[Red](#,##0.00)". I am not aware of an official way to discover these strings. I find them out by recording a macro that formats a specific cell and then checking out the resulting VBA code. From there you can read the dataFormat code.

Value

DataFormat returns a list one component dataFormat, and a class attribute "DataFormat". DataFormat objects are used when constructing cell styles.

is.DataFormat returns TRUE if the argument is of class "DataFormat" and FALSE otherwise.

See Also

CellStyle for using the a DataFormat object.

Aliases
  • is.DataFormat
  • DataFormat
Examples
# NOT RUN {
  df <-  DataFormat("#,##0.00")

# }
Documentation reproduced from package xlsx, version 0.6.3, License: GPL-3

Community examples

Looks like there are no examples yet.