add the bacis function to create csv file and show in document view