R/clsales_reader.R

#' @title clsales_reader
#'
#' @description A function to read sales data into a dataframe from
#' L:\\Rochester-Quality Regulatory Compliance\\SRMS\\SRMS Wrkspace\\Customer Quality Monthly Analysis Reports
#'
#' @param filepath Path to Excel Workbook to write in. Must be in .xlsx format.
#' @param datastart Row index where data starts. Defaults to 10.
#'
#' @return Returns sales data as a dataframe.
#'
#' @export

clsales_reader <- function(
  filepath,
  datastart = 10
) {
  df <- openxlsx::read.xlsx(
    xlsxFile = filepath,
    startRow = datastart
  )

  return(df)
}
kimjam/srms documentation built on May 20, 2019, 10:21 p.m.