如何在Web服务器上保存Excel文件时解决[1] IE错误? [英] How to work around the [1] IE bug while saving an excel file from a Web server?

查看:181
本文介绍了如何在Web服务器上保存Excel文件时解决[1] IE错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到Internet Explorer在从互联网下载的文件(通常为[1])中添加了一个方括号。在Excel工作表名称中,方括号不是有效的文件名字符时,会导致下载Excel电子表格的一个大问题。那个问题是IE特定的,其他浏览器保持相同的文件名。



所以,如果你有一个数据透视表在文件打开时自动刷新,你会得到



是否有任何解决方案?


$一个错误消息说,名称file [1] .yourPivotTableName无效。编辑:看起来,无论HTTP指令建议的文件名,IE都会在所有情况下添加[1],从而导致问题! (所以关于文件名的答案在这种情况下是没有帮助的)



编辑:当我打开一个VBA代码时,我尝试使用另一个名字保存文件。但是,它不起作用(与之前相同的错误消息)。你有没有办法用VBA来解决这个问题?

解决方案

我已经使用这个很酷的人提供的VBA (喜欢他)
它重命名文件,然后重新连接枢轴。



http://php.kennedydatasolutions.com/blog/2008/02/05/internet-explorer-breaks-excel-pivot-表/


I've noticed that Internet Explorer adds a number in square brackets to files downloaded from the internet (usually [1]). This creates a big problem with downloading Excel spreadsheets as square brackets are not a valid filename character inside Excel worksheet name. That problem is IE specific, others browsers are keeping same file name.

So, if you have a pivot table auto-refreshed on file opening for example, you'll get an error message saying the name "file[1].yourPivotTableName" is not valid.

Is there any solution to that problem ?

EDIT : It seems that whatever the filename suggested by HTTP directives, IE adds [1] in all cases, which cause the problem ! (So, answers about filenames aren't helpful in that case)

EDIT : I've tried some VBA code to save file under another name when it'll open. However, it doesn't work (same error message than before). Do you think there's a way to fix that with VBA ?

解决方案

I've got it working using VBA provided by this cool guy (think of him fondly). It renames the file and then reattaches the pivots.

http://php.kennedydatasolutions.com/blog/2008/02/05/internet-explorer-breaks-excel-pivot-tables/

这篇关于如何在Web服务器上保存Excel文件时解决[1] IE错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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