1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MS Accessのデータをcsvエクスポートする

Last updated at Posted at 2019-11-28

TL;DR(一言でまとめると)

  • mdbtoolsというツールを使うと、Accessに入ったデータをcsvでエクスポートできます
  • mdbtoolsはLinuxならyum install (CentOS) や apt install (Ubuntu) で簡単にインストールできます
  • Windows版も有志の方が作っているようです

背景

社内でテキストマイニングを布教していると「うちのAccessに入ってるデータも分析できない?」というお話をいただくことがあります。

そんなとき、データを一旦csvに出力できれば、既存のソフトに読み込ませたり、Pythonで加工したりすることも楽になりますよね。

手順

Linuxであれば以下の3ステップで終了です:

  1. yum install mdbtools (CentOS) または apt install mdbtools (Ubuntu) でmdbtoolsをインストールする
  2. mdb-tables -1 (*.mdbかまたは*.accdbファイルのパス) でAccessデータベースに格納されているテーブルの名前の一覧を表示する
  3. mdb-export (*.mdbかまたは*.accdbファイルのパス) (テーブル名) > (csvファイル名) でcsvエクスポートする

Windows版も有志の方が作っているようなのでこちらの配布サイトにあるファイル一式をダウンロードして、コマンドプロンプトから上記のようなコマンドを実行すれば、同様の操作を行うことができると思います(未検証)

参考資料

こちらの記事を大いに参考にさせていただきました。ありがとうございます: https://qiita.com/ekzemplaro/items/f2e59076c94d460c7fa6

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?