xlsxtractr
: Extract Things From Excel (xlsx) Files
Inspired by this SO question.
The following functions are implemented:
extract_formulas
: Extract formulas from an Excel workbook sheetread_xlsx
: Read in an Excel document for various extractionsThe following data sets are included:
system.file("extdata/wb.xlsx", package="xlsxtractr")
: sample xlsx filedevtools::install_git("https://gitlab.com/hrbrmstr/xlsxtractr.git") # OR devtools::install_github("hrbrmstr/xlsxtractr")
options(width=120)
library(xlsxtractr) library(purrr) # current verison packageVersion("xlsxtractr") doc <- read_xlsx(system.file("extdata/wb.xlsx", package="xlsxtractr")) class(doc) print(doc) length(doc) extract_formulas(doc, 1) extract_formulas(doc, 2) extract_formulas(doc, 3) # no formula map_df(seq_along(doc), ~extract_formulas(doc, .))
library(xlsxtractr) library(testthat) date() test_dir("tests/")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.