Load_Excel_Data: Read data from Excel files and return a named list of data...

View source: R/DataForEstimation.R

Load_Excel_DataR Documentation

Read data from Excel files and return a named list of data frames

Description

Read data from Excel files and return a named list of data frames

Usage

Load_Excel_Data(ExcelFilePath)

Arguments

ExcelFilePath

character. Path to the Excel file (.xlsx) to load. Must be a valid file path. The file can contain multiple sheets; each sheet will be loaded as a separate data frame in the output list.

Details

Uses the readxl package to read all sheets from the specified Excel file. Each sheet is returned as a data frame. The output is a named list, with names matching the sheet names in the Excel file.

Value

Named list of data frames, one for each sheet in the Excel file. The names of the list elements correspond to the sheet names.

Examples

if (!requireNamespace("readxl", quietly = TRUE)) {
  stop(
    "Please install package \"readxl\" to use this feature.",
    call. = FALSE
  )

  Load_Excel_Data(system.file("extdata", "MacroData.xlsx", package = "MultiATSM"))
  Load_Excel_Data(system.file("extdata", "YieldsData.xlsx", package = "MultiATSM"))
}

MultiATSM documentation built on Nov. 5, 2025, 7:01 p.m.