Html download Excel file

0

I have here a problem in downloading excel. In PDF I have this:

  <a href="RH/Exemplo.PDF">

I tried to put it in the same way in excel and it does not work.

  <a href="RH/Exemplo.xlsx"><img src="images/excel.png" width="56" height="56" align="middle" ></a>

Resolved:

I added

download="ficheiro.xlsx"
    
asked by anonymous 18.06.2015 / 11:36

2 answers

0

1 - Check the file name, the file extension. It would be nice to be all tiny, with no accent and no spaces.

2 - Check the location of the file. Following the same guidelines above. Lowercase letters, without accent and without spaces.

3 - In addition, you can use the absolute path of the file. Are you doing this on a localhost? You can put it in href - link . If not, enter your domain.

    
18.06.2015 / 13:39
-1

It is preferable to place the .xls so it is read by all versions.

  <a href="RH/Exemplo.xls"><img src="images/excel.png" width="56" height="56" align="middle" ></a>
    
18.06.2015 / 11:52