为什么 IE 7 在保存时将下载的 XLA 文件重命名为 XLS?
我有一个正在 Intranet 上发布的 Excel 加载项文件(普通的 HTTP 下载,而不是 Sharepoint 中的附件等)。
在 IE 7 中,用户单击链接并选择“保存”,只会将文件从“myaddin.xla”重命名为“myaddin.xls”。 Firefox 和 Chrome 运行良好。
由于他们试图覆盖“库”文件夹中的现有文件,并且这些用户都不是经验丰富的用户,因此这个问题使我的生活变得复杂。
我可以在服务器上做些什么(MIME 类型更改等)来强制 IE7 按原样保留扩展名吗?
I have an Excel Add-In file I'm publishing on an intranet (plain ol' HTTP download, not an attachment in Sharepoint, etc.).
With IE 7, the user click the link and selects "Save", only to have the file renamed from "myaddin.xla" to "myaddin.xls". Firefox and Chrome work fine.
Since they are trying to overwrite an existing file in the Library folder and these are not sophisticated users, this issue is complicating my life.
Is there anything I can do on the server (MIME type change, etc.) to force IE7 to leave the extension as-is?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否看过这篇 Microsoft 知识库文章?显然,xla 文件实际上是没有工作表的 xls 文件,因此具有相同的 MIME 类型。您可以尝试指定替代 MIME 类型来欺骗 IE7,使其不理会扩展名。
Have you had a look at this Microsoft KB article? Apparently, xla files are really xls files with no worksheets, and therefore have the same MIME type. You might try specifying an alternative MIME type to fool IE7 into leaving the extension alone.
它看起来像是 Internet Explorer 中的一个
bug
。我认为的一种解决方案是以编程方式将文件重命名回.xls
但我仍然认为最好的选择是要求您的用户使用
“另存为”
并保存它明确为“.xla”。周围的每个人似乎都在这样做。Its seems like a
bug
in Internet Explorer. One solution I think is to programatically rename the file back to.xls
But I still feel that the best option is to ask your user to use
"Save as"
instead and save it explicitly as ".xla". Everyone around seems to be doing this.