我编写了一个宏来打开一个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:=FalseI 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:=False56 is for .xls format. Now the result workbook is opening without any fuss. Phew..!!
更多推荐
对此说“是”之后Excel文件变得腐败
发布评论