如何创建 Excel 文件下载 link
How to create an Excel file download link
如何为现有 Excel 文件创建下载 link?
<a href='/path/to/excel/file.xls' download="file.xls">Download </a>
我试过了,但它不允许我下载文件。
我需要将 Excel 文件复制到 Visual Studio 吗?
如果它不能用作 link,您也可以尝试将其用作按钮 :
<form>
<input type="button" value="Download" onClick="window.location.href='/path/to/excel/file.xls'">
</form>
如何为现有 Excel 文件创建下载 link?
<a href='/path/to/excel/file.xls' download="file.xls">Download </a>
我试过了,但它不允许我下载文件。 我需要将 Excel 文件复制到 Visual Studio 吗?
如果它不能用作 link,您也可以尝试将其用作按钮 :
<form>
<input type="button" value="Download" onClick="window.location.href='/path/to/excel/file.xls'">
</form>