604 add xls export to data endpoint

closes #604
The data should be returned based on the format suffix i.e. if the suffix is '.xml' return an xml response. I am renaming this function to 'custom_response_handler' to avoid any confusion