Skip to content

Repository files navigation

Access To CSV Utility

Description

This utility is a Windows console app that reads an Access file (mdb|accdb) and exports all user tables to a csv file.

Code published from a Visual Studio C# project on dotnet6.

Prerequisites

  • 64 bit ODBC Access Driver installed
  • Windows 7+

Usage

mdbtocsv -s:"sourceFileName" -noprompt -lower

The above example will extract all tables in source file as separate CSVs using ',' as default delimiter.

PARAMETERS:

OPTION DESCRIPTION
-s:<sourceFileName> (required) The Access file to process. Wrap in quotes if you have spaces in the path.
--options-file:<filename> (optional) Provide a custom options filename. Looks for a .config file in App Path by default. This file is only required to over-ride default behaviour
--nooverwrite (optional) Disables file over-write of output file. (Not Implemented)
-o:<directory> (optional) user specified output directory. Default = same path as source file.
--filter:<table_filter> (optional) Filters output tables to match provided string. (case in-sensitive)
--nolog (optional) disables the runtime log. Set this as very first parameter to fully disable log. (Not Implemented)
--lower (optional) force output filenames to be lowercase.
--upper (optional) force output filenames to be UPPERCASE.
--add-date (optional) Appends source file create date to output file(s).
--add-filename (optional) Adds source filename as last field in output file(s).
-p (optional) use PIPE '|' Delimiter in output file.
-t (optional) use TAB Delimiter in output file.
--clean (optional) Clean Fieldnames. Replaces all symbol chars with '_' and convert FieldName to UPPER case.
--debug (optional) enables debug 'verbose' mode.
--no-archive (optional) Disables the Archive option, even if enabled in .config file.

Example

mdbtocsv.exe "-s:c:\data\receipts.mdb" -p -c -lower

This parses all tables found in the receipts.mdb file, using the PIPE delimiter, cleaning the fieldnames, and writing the output filenames in lowercase.

License and Contact

MIT License

mdbtocsv also uses the csvhelper library with its own license.

Contact me for any questions or concerns.

About

Microsoft Access To CSV Utility .net-core-6

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages