如何在 Excel 下载时抑制文件损坏警告? [英] How to suppress the file corrupt warning at Excel download?

查看:26
本文介绍了如何在 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-

您尝试打开的文件,'filename.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?

我能否以编程方式抑制此警告消息(即隐藏它或阻止它显示?)我正在使用 ColdFusion 进行 Web 开发.

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 Hardening 的特性引起的,你可以找到更多关于它的信息 这里

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

我在我的项目中经常遇到这个问题,就像 Jon 所说的,关闭扩展强化是每个客户端用户都必须完成的事情.

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天全站免登陆