Convert the data of a table into a delimited text string. Save the string as a character vector or write it to a text file. This direct conversion makes it easy to read tables into R or a spreadsheet.
export_mdb(
file,
table,
output = TRUE,
delim = ",",
quote = "\"",
quote_escape = "double",
col_names = TRUE,
eol = "\n",
date_format = "%Y-%m-%d %H:%M:%S"
)
Path to the Microsoft Access file.
Name of the table, list with mdb_tables()
.
Path or connection to write to. Passed to the stdout
argument
of system2()
. Possible values are "", to the R console (the default),
NULL
or FALSE
(discard output), TRUE
(capture the output in a
character vector) or a character string naming a file.
Delimiter used to separate values.
Single character used to quote strings. Defaults to "
.
The type of escaping to use for quoted values, one of
"double"
, "backslash"
or "none"
. You can also use FALSE
, which is
equivalent to "none". The default is "double"
, which is expected format
for Excel.
If FALSE
, column names will not be included at the top of
the file. If TRUE
, column names will be included.
The end of line character to use. Most commonly either "\n"
for
Unix style newlines, or "\r\n"
for Windows style newlines.
The format in which date columns are converted. MDB Tools
uses the strftime(3)
format, similar to readr::parse_date()
. No need to
specify whole string. Defaults to ISO8601.
Character string, invisible if path to file.
if (FALSE) { # \dontrun{
export_mdb(mdb_example(), "Airlines", output = TRUE)
} # }