File: loadWorkbook.Rd

package info (click to toggle)
r-cran-openxlsx 4.2.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,328 kB
  • sloc: cpp: 1,867; makefile: 2
file content (44 lines) | stat: -rw-r--r-- 1,119 bytes parent folder | download
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loadWorkbook.R
\name{loadWorkbook}
\alias{loadWorkbook}
\title{Load an existing .xlsx file}
\usage{
loadWorkbook(file, xlsxFile = NULL, isUnzipped = FALSE, na.convert = TRUE)
}
\arguments{
\item{file}{A path to an existing .xlsx or .xlsm file}

\item{xlsxFile}{alias for file}

\item{isUnzipped}{Set to TRUE if the xlsx file is already unzipped}

\item{na.convert}{Should empty/blank cells be converted to \code{NA_character_}. Defaults to TRUE.}
}
\value{
Workbook object.
}
\description{
loadWorkbook returns a workbook object conserving styles and
formatting of the original .xlsx file.
}
\examples{
## load existing workbook from package folder
wb <- loadWorkbook(file = system.file("extdata", "loadExample.xlsx", package = "openxlsx"))
names(wb) # list worksheets
wb ## view object
## Add a worksheet
addWorksheet(wb, "A new worksheet")

## Save workbook
\dontrun{
saveWorkbook(wb, "loadExample.xlsx", overwrite = TRUE)
}

}
\seealso{
\code{\link[=removeWorksheet]{removeWorksheet()}}
}
\author{
Alexander Walker, Philipp Schauberger
}