write_rcdf_xlsx: Write RCDF data to Excel files

View source: R/write_rcdf_as.R

write_rcdf_xlsxR Documentation

Write RCDF data to Excel files

Description

Writes each table in the RCDF object as a separate '.xlsx' file using the 'openxlsx' package.

Usage

write_rcdf_xlsx(data, path, ..., parent_dir = NULL)

Arguments

data

A valid RCDF object.

path

The output directory.

...

Additional arguments passed to 'openxlsx::write.xlsx()'.

parent_dir

Optional subdirectory under 'path' to group Excel files.

Value

Invisibly returns 'NULL'. Files are written to disk.

See Also

write_rcdf_as

Examples

dir <- system.file("extdata", package = "rcdf")
rcdf_path <- file.path(dir, 'mtcars.rcdf')
private_key <- file.path(dir, 'sample-private-key.pem')

rcdf_data <- read_rcdf(path = rcdf_path, decryption_key = private_key)
temp_dir <- tempdir()

write_rcdf_xlsx(data = rcdf_data, path = temp_dir)

unlink(temp_dir, force = TRUE)

rcdf documentation built on Aug. 28, 2025, 9:09 a.m.