我想在一个网站上的excel文件在excel中打开时点击,而不是得到保存在桌面上,或得到打开嵌入在浏览器等。显然,这完全取决于如何为每个用户配置所有内容,但在大多数情况下,实现这一目标的最佳内容类型和其他设置是什么呢?
application/vnd.ms-excel
vnd class
用于BIFF .xls文件
适用于Excel2007及以上版本的。xlsx文件
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
请记住,当您尝试上传已经打开的文件时,file.getContentType也可以输出应用程序/八进制而不是所需的应用程序/ vnd.openxmlformats-officedocument.spreadsheetml.sheet。
file.getContentType