Monthly Archives: May 2010

Converting MDB to CSV using OOo/LibO

This post explains the steps necessary to convert a Microsoft Access database file into CSV, using (or LibreOffice) Base.

  1. OOo can’t open an MDB file natively. You have to create a new ODB file that connects to the MDB file as a “remote” database. Just don’t try to move around the files.

  2. Copy the tables over into a different, native ODF database (ODB) file. This may sound arbitrary, but it’s necessary; otherwise, the next step would either be impossible or unbearable.

  3. Base doesn’t have an “export to CSV” menu entry. You have two options:

    • Run the following SQL command (Tools → SQL…).

      SELECT * INTO TEXT "filename_without_ext" FROM "TableName"

      This command only works on a native ODB because Access’s SQL engine doesn’t support the INTO TEXT construct.

      Note that this actually creates an external table in the database (if it doesn’t show up, reload the database). As a consequence, you can’t use the same name for the CSV file as an existing table.

    • Copy the table into Calc and export it to CSV. This would have been extremely slow if done from the non-native DB.

Credits to the people at an thread who figured this out.


User agent madness

Have you seen Chrome/Chromium’s user agent string?

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.8 (KHTML, like Gecko) Chrome/5.0.394.0 Safari/533.8

I’m surprised they didn’t throw IE and Opera in there as well, for good measure.

I know of the compatibility arguments, but really, this is absurd.

Update (2010-05-26): Compare with Midori’s UA string:

Midori/0.2 (X11; Linux; U; en-us) WebKit/531.2+