\item{keepNames}{The function automatically renames the column names with \code{\link[stringr:case]{stringr::str_to_sentence()}}. Setting this to TRUE will leave your column names unaltered}
\item{overwrite}{Sets permissions for overwriting old files. Default is TRUE}
\item{IncludeAll}{Include a tab with the complete data}
\item{AllFirst}{Places the all tab at the beginning of the tabs. If FALSE, placed at end. Only fucntions when IncludeAll==TRUE}
\item{AllName}{Allows the All Data tab to be renamed.}
\item{dollarCols}{Vector of strings specifying the columns to save as ACCOUNTING datatypes in Excel}
\item{percentCols}{Vector of strings specifying the columns to save as PERCENTAGE datatypes in Excel}
\item{condCols}{Vector of strings specifying the columns to apply conditional coloring to in Excel}
\item{condColors}{Vector of length 2 or 3 that defines the colors used in conditional formatting}
\item{lowBad}{When TRUE (default), colors low values the first color in the vector (Red by default), if false, inverts the vector}
\item{rule}{Allows specification of the conditional color numeric range. Defaults to min/max of column}
}
\value{
Creates a Excel workbook from the supplied dataframe
...
...
@@ -23,11 +56,3 @@ Creates a Excel workbook from the supplied dataframe
\description{
Flexible Workbook Creation Function
}
\examples{
library(datasets)
library(tidyverse)
library(openxlsx)
data(iris)
wbsave(iris, "Iris report.xlsx")
wbsave(iris, "Iris report - by Species.xlsx", sheetBy="Species", keepNames=TRUE)
% Please edit documentation in R/JoeToolFunctions.R
\name{wbsave2}
\alias{wbsave2}
\title{Flexible Workbook Creation Function}
\usage{
wbsave2(
filename,
...,
sheetNames = NULL,
keepNames = TRUE,
overwrite = TRUE,
dollarCols = NULL,
percentCols = NULL,
condCols = NULL,
condColors = c("#F8696B", "#FFEB84", "#63BE7B"),
lowBad = TRUE,
rule = NULL
)
}
\arguments{
\item{filename}{Name of the resulting .xlsx file}
\item{...}{List of dataframes to have as sheets}
\item{sheetNames}{List of sheet names in order of the ... argument. If left NULL (default), then the dataframe object names will be used as sheet names.}
\item{keepNames}{The function automatically renames the column names with \code{\link[stringr:case]{stringr::str_to_sentence()}}. Setting this to TRUE will leave your column names unaltered}
\item{overwrite}{Sets permissions for overwriting old files. Default is TRUE}
\item{dollarCols}{Vector of strings specifying the columns to save as ACCOUNTING datatypes in Excel}
\item{percentCols}{Vector of strings specifying the columns to save as PERCENTAGE datatypes in Excel}
\item{condCols}{Vector of strings specifying the columns to apply conditional coloring to in Excel}
\item{condColors}{Vector of length 2 or 3 that defines the colors used in conditional formatting}
\item{lowBad}{When TRUE (default), colors low values the first color in the vector (Red by default), if false, inverts the vector}
\item{rule}{Allows specification of the conditional color numeric range. Defaults to min/max of column}
}
\value{
Creates a Excel workbook from the supplied dataframe