tests/testthat/test-extract-excel.R

context("Extract Excel")

test_that("All three sample Excel files found recursively", {
  extract_excel("../test-data-for-xlutils3") %>%
    # Expect there are 3 workbooks
    expect_length(3) %>%
    # Expect there is a total of 5 sheets in all 3 workbooks
    { expect_equal(Reduce(f = function(cumlen, wb) { cumlen + length(wb) }, x = . , init = 0), 5) ; invisible( . ) }

})

Try the xlutils3 package in your browser

Any scripts or data that you put into this service are public.

xlutils3 documentation built on May 2, 2019, 6:09 a.m.