View source: R/read_excel_allsheets.R
read_excel_allsheets | R Documentation |
Read in multiple excel sheets from a workbook & turn them into one tibble or a series of data frames each named after the sheet name. Each excel sheet should have matching column names to ensure correct row binding occurs.
read_excel_allsheets(filename, single_frame = TRUE)
filename |
The file path to the .xlsx from which you want to pull all sheets |
single_frame |
DEFAULT = TRUE; If TRUE, will combine all sheets from an excel workbook into a single data frame with a variable called "sheet_name" having the values of the different sheet names. If FALSE, will read in all sheets from an excel workbook but will create a separate data frame for each sheet (each data frame will be named after what the sheet was called) |
# Create a single data frame with all sheets stacked
## Not run:
responses <- read_excel_allsheets(
~/Desktop/Example Excel File.xlsx')
# Create a list and multiple data frames, one for each sheet in the excel file
responses <- read_excel_allsheets(
~/Desktop/Example Excel File.xlsx', FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.