Link to download an Excel document not working in Gmail under Chrome

In one of my website I am sending an email with a link to download an Excel document. For ages it has been working like a charm but today my client wrote to me saying clicking on the link doesn’t download the document. After some investigation I noticed that this issue is when using Gmail under Chrome, the links are working just fine under Firefox or Edge.

I tried fiddling with the target using all possibilities but it seems that Gmail replaces them with target="_blank"

and ignoring my code
2021-02-03_21-39-25

Any clue on what I could do ? The link to the PDF document works fine, only the link to the Excel file doesn’t, a new window appears but nothing is downloaded.

So far my advice was to use Firefox or right click, copy the link address and paste it in the browser, both are not very user friendly !

I have seen posts that mention that Gmail through chrome may block XLSX files for being a potential security issue. Just do a google search with the terms “gmail chrome blocks xlsx” and you will see some chatter about it. Some of it recently.

One way you can probably get around it is to zip the xslx files up and offer zip files instead. That way the user can download the zip and unzip it to reach the xslx file. That would be one way to get around it.

I tried the zip file but same thing: Chrome blocked its download.

The way around I found is instead of having a link in the message’s text was to add the Excel as an attached document, not exactly what the client wanted but he feels better that way than having to use Firefox.