Skip to content

readxl 1.2.0

Compare
Choose a tag to compare
@jennybc jennybc released this 20 Dec 02:45

Column name repair

readxl exposes the .name_repair argument that is coming to version 2.0.0 of the tibble package. The readxl default is .name_repair = "unique", keeping with the readxl convention to ensure column names are neither missing nor duplicated.

  • Column Names is a new article about this feature.
  • readxl delegates name repair to tibble, therefore the installed tibble version determines how names are repaired.
  • If tibble >= v2.0.0, the full power of .name_repair is available, defaulting to .name_repair = "unique". Otherwise, the legacy function tibble::repair_names(prefix = "X", sep = "__") is used, replicating the behaviour of readxl v1.1.0.
    • Consider a spreadsheet with three columns: one unnamed and two named x.
    • Content of cells in Excel: "", x, x
    • New style column names: ..1, x..2, x..3
    • Legacy column names: X__1, x, x__1
  • Once per session, readxl emits a message stating that it works best with tibble >= v2.0.0. It is anticipated that this will become a hard minimum version requirement in a future version of readxl.

Other changes

  • read_excel() and friends gain a progress argument that controls a progress spinner (#243, #538).

  • read_xls() and read_xlsx() pass the trim_ws argument along (#514).

  • readxl has a new article on reading Excel files with multiple header rows (#486, #492 @apreshill).

  • xlsx files that do not have a "styles" part can now be read (#505, #506 @jt6)

  • All paths are passed through normalizePath() (#498, #499, new behaviour for xlsx but not xls) and enc2native() (#370).

Dependency changes

readxl is now tested back to R >= 3.1.

Embedded libxls has been updated, using the source in https://github.com/evanmiller/libxls. readxl's DESCRIPTION now records the SHA associated to the embedded libxls in a Note.