some re-work of the table export tool.