xlsx_color_theme: Import theme color definitions from xlsx (Excel) files

Description Usage Arguments Value Examples

View source: R/xlsx_color_theme.R

Description

xlsx_color_theme() (alias xlsx_colour_theme() returns the names and RGB values of theme colours defined in xlsx (Excel) files. For example, "accent6" is the name of a theme colour in Excel, which could resolve to any RGB colour defined by the author of the file. Themes are often defined to comply with corporate standards.

Usage

1
2
3
xlsx_color_theme(path, check_filetype = TRUE)

xlsx_colour_theme(path, check_filetype = TRUE)

Arguments

path

Path to the xlsx file.

check_filetype

Logical. Whether to check that the filetype is xlsx (or xlsm) by looking at the file itself, rather than using the filename extension.

Value

A data frame, one row per colour, with the following columns.

Examples

1
2
3
examples <- system.file("extdata/examples.xlsx", package = "tidyxl")
xlsx_color_theme(examples)
xlsx_colour_theme(examples)

Example output

                 name      rgb
1         background1 FFFFFFFF
2               text1 FF000000
3         background2 FFEEECE1
4               text2 FF1F497D
5             accent1 FF4F81BD
6             accent2 FFC0504D
7             accent3 FF9BBB59
8             accent4 FF8064A2
9             accent5 FF4BACC6
10            accent6 FFF79646
11          hyperlink FF0000FF
12 followed-hyperlink FF800080
                 name      rgb
1         background1 FFFFFFFF
2               text1 FF000000
3         background2 FFEEECE1
4               text2 FF1F497D
5             accent1 FF4F81BD
6             accent2 FFC0504D
7             accent3 FF9BBB59
8             accent4 FF8064A2
9             accent5 FF4BACC6
10            accent6 FFF79646
11          hyperlink FF0000FF
12 followed-hyperlink FF800080

tidyxl documentation built on Nov. 16, 2020, 5:09 p.m.