Skip to contents

Extracts formatting information from a spreadsheet.

Usage

get_formatting(xlfilepath, sheet = NULL)

Arguments

xlfilepath

A character string specifying the path to the spreadsheet.

sheet

A character string with the name of a sheet within a workbook, or an integer with the position of the sheet. Defaults to the first sheet if left unspecified.

Value

A data frame or list with parsed formatting information.

Examples

example_file <- system.file("extdata/rodentsheet.xlsx", package = "forgts")
get_formatting(example_file)
#> # A tibble: 455 × 4
#>    rowid target_var       format             val  
#>    <chr> <chr>            <chr>              <chr>
#>  1 1     measurement type bold               FALSE
#>  2 1     measurement type italic             TRUE 
#>  3 1     measurement type underlined         NA   
#>  4 1     measurement type hl_color           NA   
#>  5 1     measurement type strikethrough      FALSE
#>  6 1     measurement type text_clr           NA   
#>  7 1     measurement type border_top_style   NA   
#>  8 1     measurement type border_top_clr     NA   
#>  9 1     measurement type border_right_style NA   
#> 10 1     measurement type border_right_clr   NA   
#> # ℹ 445 more rows