Converts tables to csvs