change tables to csv, write docx as markdown