对此说“是”之后Excel文件变得腐败

编程入门 行业动态 更新时间:2024-10-28 07:20:31
本文介绍了对此说“是”之后Excel文件变得腐败 - “小心!文档的某些部分可能包含文档检查员无法删除的个人信息。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我编写了一个宏来打开一个excel模板,对它进行一些计算,然后SaveAs它。问题在于保存文件时我收到此通知 - 小心!文档的某些部分可能包含 由文档检查器删除。

单击确定会在单击取消时呈现损坏的Excel文件,但不会保存文件根本没有。 虽然起初我只是通过提供路径和文件名(D:\ folder1 \ file.xlsx)来保存它,后来我尝试了它提到我在网上找到的一般信息(

Filename:= C:\ Data \& BookName,FileFormat:= _ xlNormal,Password:= ,WriteResPassword:= ,ReadOnlyRecommended:= False _ ,CreateBackup:= False

),但没有收获。 我正在使用Excel 2013. 这个问题突然出现了。在代码给出完美结果之前。 任何想法是什么? 谢谢。 我尝试了什么: 我试过

文件名:= C:\ Data \& BookName,FileFormat:= xlNormal,密码:= ,WriteResPassword:= ,ReadOnlyRecommended:= False _ ,CreateBackup:= False

我甚至用51替换xlNormal,但它仍然不起作用。

解决方案

现在我使用以下方式保存:

Wbk.SaveAs文件名:= D:\ folder \filename.xls,FileFormat:= 56 ,密码:= ,WriteResPassword:= ,ReadOnlyRecommended:= False,CreateBackup:= False

56是.xls格式。现在结果工作簿没有任何大惊小怪。 Phew .. !!

I have written a macro that opens an excel template, does some calculations on it and then SaveAs "" it. Problem is while saving the file I am getting this notification - "

Be careful! Parts of your document may include personal information that can't be removed by the Document Inspector.

Clicking OK renders a corrupt excel file while clicking cancel does not save the file at all. Though at first I was saving it by simply giving path and file name (D:\folder1\file.xlsx), later I tried it with mentioning general information I found on net(

Filename:="C:\Data\" & BookName, FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False

), but with no gain. I am using Excel 2013. This problem arose all of a sudden. Before the code gave perfect result. Any idea what is this? Thanks. What I have tried: I tried with

Filename:="C:\Data\" & BookName, FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False

I even replaced xlNormal with 51 as I found but it still does not work.

解决方案

Now I am saving using the following way:

Wbk.SaveAs Filename:="D:\folder\filename.xls", FileFormat:=56, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False

56 is for .xls format. Now the result workbook is opening without any fuss. Phew..!!

更多推荐

对此说“是”之后Excel文件变得腐败

本文发布于:2023-10-31 08:06:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1545519.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:腐败   对此   文件   Excel

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!