write_excel_workbook: Write Excel workbook

View source: R/utils_write_excel_workbook.R

write_excel_workbookR Documentation

Write Excel workbook

Description

Save a table to disk as an Excel Spreadsheet.

Usage

write_excel_workbook(x, path)

Arguments

x

data.frame object (or list of data.frame objects) to save to disk.

path

character file path to save data.

Details

This function is similar to the openxlsx::write.xlsx function. The main difference is that it formats cells columns containing numeric values (and numeric-like values) using the "NUMBER" format, and the remaining cells as "TEXT" format.

Value

Invisible TRUE indicating success.

Examples

# create file path to save data
f <- tempfile(fileext = ".xlsx")

# load example dataset to save to disk
data(iris)
d <- iris

# save dataset to disk
write_excel_workbook(d, f)

NCC-CNC/wheretowork documentation built on Feb. 27, 2025, 6:11 p.m.