HTML file download Excel

Asked

Viewed 415 times

2

I have a problem with downloading excel. In PDF I have so:

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

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

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

Solved :

I added

download="ficheiro.xlsx"
  • What kind of mistake it makes?

  • does not download. It says that the page is not available

  • It will be no problem on the way to excel?

  • path I’m sure is correct. Excel is in a folder

  • Page/RH/example.xlsx and says it doesn’t exist. But I just want to download it

2 answers

0

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

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

3 - In addition, you can use the absolute path of the file. Are you doing this on a Localhost ? You can put it on href - http://localhost/seu_site/Rh/example.xls. If not, put your domain.

-1

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

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.