Skip to contents

Retrieves all sheets of a Microsoft Excel workbook and identifies the formatting of each value (including column headers and blank cells).

Usage

read_xl_format(file_name = NULL)

Arguments

file_name

(character) Name of (and path to) the Excel workbook

Value

(data frame) One row per cell in the dataframe with a column for each type of relevant formatting and its 'address' within the original Excel workbook

Examples

# Identify the formatting of every cell in all sheets of an Excel file
read_xl_format(file_name = system.file("extdata", "excel_book.xlsx", package = "scicomptools"))
#>           sheet address row col cell_contents                           comment
#> 1   first_table      A1   1   1         col_1                              <NA>
#> 2   first_table      B1   1   2         col_2                              <NA>
#> 3   first_table      A2   2   1           cat                              <NA>
#> 4   first_table      B2   2   2             2                              <NA>
#> 5   first_table      A3   3   1           dog                              <NA>
#> 6   first_table      B3   3   2             1                              <NA>
#> 7   first_table      A4   4   1          bird                              <NA>
#> 8   first_table      B4   4   2             3                              <NA>
#> 9   first_table      A5   5   1          fish                              <NA>
#> 10  first_table      B5   5   2             5                              <NA>
#> 11 second_table      A1   1   1          name                              <NA>
#> 12 second_table      B1   1   2         order                              <NA>
#> 13 second_table      C1   1   3      quantity Microsoft Office User:comment\r\n
#> 14 second_table      A2   2   1          Alex                              <NA>
#> 15 second_table      B2   2   2        item_1                              <NA>
#> 16 second_table      C2   2   3            65                              <NA>
#> 17 second_table      A3   3   1          Jane                              <NA>
#> 18 second_table      B3   3   2        item_2                              <NA>
#> 19 second_table      C3   3   3            23                              <NA>
#> 20 second_table      A4   4   1           Max                              <NA>
#> 21 second_table      B4   4   2        item_3                              <NA>
#> 22 second_table      C4   4   3            30                              <NA>
#> 23  third_table      A1   1   1          date                              <NA>
#> 24  third_table      B1   1   2          site                              <NA>
#> 25  third_table      C1   1   3          plot                              <NA>
#> 26  third_table      D1   1   4       species                              <NA>
#> 27  third_table      A2   2   1    2023-01-04                              <NA>
#> 28  third_table      B2   2   2        site_1                              <NA>
#> 29  third_table      C2   2   3             A                              <NA>
#> 30  third_table      D2   2   4     species_1                              <NA>
#> 31  third_table      A3   3   1    2023-02-10                              <NA>
#> 32  third_table      B3   3   2        site_1                              <NA>
#> 33  third_table      C3   3   3             B                              <NA>
#> 34  third_table      D3   3   4     species_1                              <NA>
#> 35  third_table      A4   4   1    2023-03-11                              <NA>
#> 36  third_table      B4   4   2        site_2                              <NA>
#> 37  third_table      C4   4   3             A                              <NA>
#> 38  third_table      D4   4   4     species_1                              <NA>
#> 39  third_table      A5   5   1    2023-04-28                              <NA>
#> 40  third_table      B5   5   2        site_2                              <NA>
#> 41  third_table      C5   5   3             B                              <NA>
#> 42  third_table      D5   5   4     species_1                              <NA>
#>    formula  bold italic underline font_size font_color cell_color
#> 1     <NA>  TRUE  FALSE      <NA>        12   FF000000       <NA>
#> 2     <NA>  TRUE  FALSE      <NA>        12   FF000000       <NA>
#> 3     <NA> FALSE   TRUE      <NA>        12   FF000000       <NA>
#> 4     <NA> FALSE  FALSE      <NA>        12   FF4472C4       <NA>
#> 5     <NA> FALSE   TRUE      <NA>        12   FF000000       <NA>
#> 6     <NA> FALSE  FALSE      <NA>        12   FF4472C4       <NA>
#> 7     <NA> FALSE   TRUE      <NA>        12   FF000000       <NA>
#> 8     <NA> FALSE  FALSE      <NA>        12   FF4472C4       <NA>
#> 9     <NA> FALSE   TRUE      <NA>        12   FF000000       <NA>
#> 10    <NA> FALSE  FALSE      <NA>        12   FF4472C4       <NA>
#> 11    <NA>  TRUE  FALSE      <NA>        12   FF000000       <NA>
#> 12    <NA>  TRUE  FALSE      <NA>        12   FF000000       <NA>
#> 13    <NA>  TRUE  FALSE      <NA>        12   FF000000       <NA>
#> 14    <NA> FALSE  FALSE      <NA>        12   FF000000   FFFFFFFF
#> 15    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 16    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 17    <NA> FALSE  FALSE      <NA>        12   FF000000   FFFFFFFF
#> 18    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 19    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 20    <NA> FALSE  FALSE      <NA>        12   FF000000   FFFFFFFF
#> 21    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 22    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 23    <NA>  TRUE  FALSE      <NA>        12   FF000000       <NA>
#> 24    <NA>  TRUE  FALSE      <NA>        12   FF000000       <NA>
#> 25    <NA>  TRUE  FALSE      <NA>        12   FF000000       <NA>
#> 26    <NA>  TRUE  FALSE      <NA>        12   FF000000       <NA>
#> 27    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 28    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 29    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 30    <NA> FALSE  FALSE    single        12   FF000000       <NA>
#> 31    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 32    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 33    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 34    <NA> FALSE  FALSE    single        12   FF000000       <NA>
#> 35    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 36    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 37    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 38    <NA> FALSE  FALSE    single        12   FF000000       <NA>
#> 39    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 40    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 41    <NA> FALSE  FALSE      <NA>        12   FF000000       <NA>
#> 42    <NA> FALSE  FALSE    single        12   FF000000       <NA>