Skip to contents

Take a data frame and write it to a CSV (.csv) or Excel (.xlsx) file.

Usage

download_df(df, file_type, file)

Arguments

df

The data frame to write.

file_type

The type of the file to create, either "CSV" or "Excel".

file

A string. The file path to write to.

Value

The file path that was written to.

Examples

file <- tempfile(fileext = ".csv")
data <- tibble::tibble(
  x = 1:10
)

download_df(data, "CSV", file)