gpt4 book ai didi

Excel 2016 Office 365 灾难性故障

转载 作者:行者123 更新时间:2023-12-04 22:26:04 24 4
gpt4 key购买 nike

开始出现 Excel 灾难性故障错误

enter image description here

在确定打开调试窗口时,每次自动创建新工作表,这是空的和奇怪的结构

enter image description here

enter image description here

If I want something to do 出现

enter image description here

那么如何删除这些工作表呢?或修复该错误?
没有启动后台进程,以 xlsm 和 xlsb 格式存储的文件执行相同的操作。工作簿和工作表不 protected 。

enter image description here

最佳答案

看起来文件已损坏。这个问题不太可能从头开始很容易地重现。
无论如何,您可以编写一个 vba 宏脚本以根据其名称删除表格或不删除您要保留的表格。

sheetnametodelete= "sheetname"
With Application.Workbooks(ThisWorkbook.Name())
.Unprotect (yourpassword) ' required if protection is set
Dim wks As Worksheet
Set wks = .Sheets(sheetnametodelete)
If (Not wks Is Nothing) Then ' also check if wks belong to the defined blacklist
wks.Delete
End If
.Protect (yourpassword) ' required if protection is set
End With

尝试从另一台计算机打开文件,以防您的本地 Excel 配置损坏。

过去我遇到过类似的问题(重复的假工作簿),并决定为我的基于 Excel vba 的应用程序编写构建过程脚本。

请参阅以下链接以了解有关模块管理的更多信息。

https://www.rondebruin.nl/win/s9/win002.htm

http://www.cpearson.com/excel/vbe.aspx

你也可以看看这个帖子
Import a cls files and create a sheet

它提供来自其他贡献者的代码和评论。
这显然不是您的问题的直接答案,但如果您打算处理一致的 vba 项目,我建议不时将您的 vba 代码从 Excel 文件中保存出来,并设置您的 Excel 应用程序的构建。

关于Excel 2016 Office 365 灾难性故障,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57805429/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com