-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
68 lines (41 loc) · 1.25 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
output: rmarkdown::github_document
---
`xlsxtractr` : Extract Things From Excel (xlsx) Files
Inspired by [this SO question](http://stackoverflow.com/q/39529302/1457051).
The following functions are implemented:
- `extract_formulas`: Extract formulas from an Excel workbook sheet
- `read_xlsx`: Read in an Excel document for various extractions
The following data sets are included:
- `system.file("extdata/wb.xlsx", package="xlsxtractr")`: sample xlsx file
### Installation
```{r eval=FALSE}
devtools::install_git("https://gitlab.com/hrbrmstr/xlsxtractr.git")
# OR
devtools::install_github("hrbrmstr/xlsxtractr")
```
```{r echo=FALSE, message=FALSE, warning=FALSE, error=FALSE}
options(width=120)
```
### Usage
```{r echo=TRUE, message=FALSE, warning=FALSE, error=FALSE}
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, .))
```
### Test Results
```{r echo=TRUE, message=FALSE, warning=FALSE, error=FALSE}
library(xlsxtractr)
library(testthat)
date()
test_dir("tests/")
```