xlsx.addLineBreak: Add a line break to a worksheet

Description Usage Arguments Author(s) References Examples

View source: R/r2excel.r

Description

Add a line break to a worksheet.

Usage

1
xlsx.addLineBreak(sheet, numberOfLine = 1)

Arguments

sheet

Sheet object

numberOfLine

number of rows to skip before appending the data

Author(s)

Alboukadel Kassambara <alboukadel.kassambara@gmail.com>

References

http://www.sthda.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# create an Excel workbook. Both .xls and .xlsx file formats can be used.
wb <- createWorkbook(type="xlsx")
# Create a sheet in that workbook
sheet <- xlsx::createSheet(wb, sheetName = "example1")
 
# Add line break
xlsx.addHeader(wb, sheet, value="Header 1",level=1, color="black")
xlsx.addLineBreak(sheet, 3)
xlsx.addHeader(wb, sheet, value="Header 2",level=1, color="black")

# saving a workbook to an Excel file and write the file to the disk.
saveWorkbook(wb, "examples_add_linebreak.xlsx")

kassambara/r2excel documentation built on May 20, 2019, 7:40 a.m.