CSV export contributed by mwalz.