Turns cell formatting into annotations for all values across all variables.

annotate_mf_all(xlfilepath)

Arguments

xlfilepath

Path to a single-sheet spreadsheet file (xls or xlsx).

Value

A tibble with meaningful formatting embedded as text for all rows and columns.

Details

At this point, only four popular approaches for meaningful formatting (bold, italic, underline, cell highlighting) are hardcoded in the function. `sheets`, `skip`, and `range` arguments for spreadsheet input are not supported. The HTML code of the fill color used for cell highlighting is also appended in the output. Ensure the data in the spreadsheet are rectangular before running.

Examples

example_spreadsheet <- system.file("extdata/boutiques.xlsx", package = "unheadr") annotate_mf_all(example_spreadsheet)
#> # A tibble: 7 x 6 #> `Store Location` Q1_2012 Q1_2013 Q1_2014 Q1_2015 Q1_2016 #> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 (highlighted-FFADC… (highlight… (bolded, h… (highlight… (highlight… (bolded, … #> 2 (highlighted-FFADC… (highlight… (highlight… (highlight… (bolded, h… (highligh… #> 3 (highlighted-FFF37… (bolded, h… (highlight… (highlight… (highlight… (highligh… #> 4 (highlighted-FFADC… (highlight… (bolded, h… (bolded, h… (bolded, h… (highligh… #> 5 (highlighted-FFADC… (highlight… (highlight… (highlight… (highlight… (highligh… #> 6 (highlighted-FFF37… (bolded, h… (highlight… (bolded, h… (highlight… (bolded, … #> 7 (italic, highlight… (highlight… (highlight… (highlight… (highlight… (highligh…