You need to return the file as part of the response. Try something like
@app.route('/link/')
def download_addin():
parent_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + '/static/'
with open(os.path.join(parent_dir, 'my_addin.xlam')) as f:
response = make_response(f.read())
response.headers['Cache-Control'] = 'no-cache'
response.headers['Content-Type'] = 'application/vnd.ms-excel.addin.macroEnabled.12'
response.headers['Content-Disposition'] = 'attachment; filename=my_addin.xlam'
return response
Without doing this you'll download an empty file. That's probably why Excel doesn't like the format.