exportxlsx: Export a flextable into a .xlsx file

Description Usage Arguments Value Examples

View source: R/exportxlsx.R

Description

Export a flextable into a .xlsx file

Usage

1

Arguments

table

A flextable

path

Path to the Excel file to be created

Value

Returns an .xlsx file based on a flextable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
ft <- flextable::flextable(head(mtcars))
# color some cells in blue
ft <- flextable::bg(ft, i=ft$body$dataset$disp>200, j=3, bg = "#7ed6df", part = "body")
# color a few cells in yellow
ft <- flextable::bg(ft, i=ft$body$dataset$vs==0, j=8, bg = "#FCEC20", part = "body")
# export your flextable as a .xlsx in the current working directory
exportxlsx(ft, filename ="myFlextable", path="path/to/the/excel_file.xlsx")

## End(Not run)

MaximeSaland/YesSiR documentation built on Dec. 17, 2021, 3:19 a.m.