If your question is about how to send the file contents to the user, you simply write the content to your response object. The browser takes care of actually writing the file to the path selected by the user.
In Django, you would do something like:
def view(request):
# get the file content from somewhere
response = HttpResponse(file_content, mimetype='application/vnd.ms-excel')
response['Content-Disposition'] = 'attachment; filename=projects.xls'
return response
The browser will then prompt the user for a path and save the file "projects.xls" to that path.