如何禁止Excel下载文件损坏的警告? [英] How to suppress the file corrupt warning at Excel download?

查看:119
本文介绍了如何禁止Excel下载文件损坏的警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网页链接到Excel 2007工作表。它是一个 .xls 文件,而不是 .xlsx 文件。当我点击链接,我得到通常的对话框打开/保存Excel文件。点击打开时,我会收到以下警告消息 -

I have a web page which links to an Excel 2007 worksheet. It is a .xls file and not .xlsx file. When I click on the link I get the usual dialog box to either open/save the Excel file. On clicking 'Open', I get the following warning message-


您尝试打开的文件,
' xls'的格式不同于文件
扩展名所指定的
格式。在打开文件之前,请验证该文件是否不是
已损坏,并且来自可信源
。您要
现在打开文件吗?

The file you are trying to open, 'filename.xls' is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?

我可以用编程方式压制这个警告消息

Can I some how suppress this warning message programmatically (i.e. to hide it or prevent it from showing up?) I'm using ColdFusion for web development.

推荐答案

这个问题来自一个名为Extension的功能加强,您可以在这里

This problem results from a feature called Extension Hardening, and you can find more information about it here

我在我的项目中遇到了很多问题,就像Jon说的,关闭Extension Hardening是每个客户端都要做的事情

I've run into this problem a lot in my projects, and like Jon said, turning off Extension Hardening is something that will have to be done by each client side user.

不幸的是,上面的链接还指出,除非至少有Office 14,否则此代码没有预期的更改。

Unfortunately, the link above also states that there are no expected changes to this code until at least Office 14.

这篇关于如何禁止Excel下载文件损坏的警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆