saveXlsx: saveXlsx This function save the current workbook as filename

View source: R/xlsxTools.R

saveXlsxR Documentation

saveXlsx This function save the current workbook as filename

Description

saveXlsx This function save the current workbook as filename

Usage

saveXlsx(filename = "", wb = NULL)

Arguments

filename

An optional filename (if empty the current filename will be used )

wb

A optional workbook created or opened by xlsx If not specified, the last workbook loaded with loadXlsx will be used

Value

nothing

Examples


# Creating an empty workbook
wb <- openxlsx::createWorkbook()
sheetname <- "First Sheet"
openxlsx::addWorksheet(wb, sheetName = sheetname)

# Writing a data frame in the workbook 
fillCells(wb = wb, 
          onesheet = sheetname, 
          line = 1, 
          col = 1, 
          iris)
          
# Saving the Excel file
## Not run: 
saveXlsx(filename = "test.xlsx", wb = wb)

## End(Not run)


Epiconcept-Paris/STRAP-epiuf documentation built on Aug. 5, 2024, 3:41 a.m.