mdb-export is a utility program distributed with MDB Tools.
It produces CSV output for the given table. Such output is suitable for
importation into databases or spreadsheets.
mdb_export(
path,
table,
no_header = FALSE,
delimiter = ",",
row_delimiter = "\n",
no_quote = FALSE,
quote = "\"",
escape = NULL,
escape_invisible = FALSE,
date_format = "%Y-%m-%d",
datetime_format = "%Y-%m-%d %H:%M:%S",
null = "",
bin = c("strip", "raw", "octal", "hex"),
boolean_words = FALSE,
insert = NULL,
namespace = NULL,
batch_size = 1L,
n = -1L
)Path to .mdb/.accdb file.
Table name.
Logical, equivalent to -H/--no-header.
Equivalent to -d/--delimiter.
Equivalent to -R/--row-delimiter.
Equivalent to -Q/--no-quote.
Equivalent to -q/--quote.
Equivalent to -X/--escape.
Equivalent to -e/--escape-invisible.
Equivalent to -D/--date-format.
Equivalent to -T/--datetime-format.
Equivalent to -0/--null.
Binary mode (strip, raw, octal, hex) for parity.
Equivalent to -B/--boolean-words.
Backend for -I/--insert mode.
Equivalent to -N/--namespace.
Equivalent to -S/--batch-size.
Optional row limit (LIMIT n).
Character scalar containing CSV or SQL INSERT text.
Used with insert, it outputs backend-specific SQL INSERT statements.
Most formatting options also apply in insert mode.
db <- mdbr:::.mdb_example_nwind_path()
if (nzchar(db)) {
cat(mdb_export(db, "Products", n = 2))
}
#> ProductID,ProductName,SupplierID,CategoryID,QuantityPerUnit,UnitPrice,UnitsInStock,UnitsOnOrder,ReorderLevel,Discontinued
#> "1","Chai","1","1","10 boxes x 20 bags","18","39"," 0","10","0"
#> "2","Chang","1","1","24 - 12 oz bottles","19","17","40","25","0"