Add save function that handle the export of csv and xlsx documents
Correct formatting