Learn R Programming

openxlsx2 (version 0.4.1)

wb_add_numfmt: add numfmt for cell region

Description

add numfmt for cell region

Usage

wb_add_numfmt(wb, sheet = current_sheet(), dims = "A1", numfmt)

Value

The wbWorksheetObject, invisibly

Arguments

wb

a workbook

sheet

the worksheet

dims

the cell range

numfmt

either an id or a character

See Also

Other styles: wb_add_border(), wb_add_cell_style(), wb_add_fill(), wb_add_font(), wb_clone_sheet_style()

Examples

Run this code
 wb <- wb_workbook() %>% wb_add_worksheet("S1") %>% wb_add_data("S1", mtcars)
 wb %>% wb_add_numfmt("S1", dims = "F1:F33", numfmt = "#.0")

Run the code above in your browser using DataLab