View source: R/write_excel_sheets_to_csv.R
write_excel_sheets_to_csv | R Documentation |
This function reads an Excel file, converts each sheet into a data frame, and writes each sheet to a CSV file in the specified output directory.
write_excel_sheets_to_csv(excel_path, output_dir = "data/")
excel_path |
A character string specifying the path to the Excel file. |
output_dir |
A character string specifying the directory where CSV files will be saved. Defaults to "data/". |
A list of file paths corresponding to the exported CSV files.
# Path to the example Excel file shipped with the package
excel_file <- system.file("extdata", "Diamonds.xlsx", package = "bulkreadr")
# Export each sheet to its own CSV in a temporary directory
output_dir <- tempdir()
write_excel_sheets_to_csv(excel_file, output_dir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.