`

EXCEL工作表保护密码忘记了,如何撤消工作表保护?

阅读更多

1\打开文件
2\工具---宏----录制新宏---输入名字如:aa
3\停止录制(这样得到一个空宏)
4\工具---宏----宏,选aa,点编辑按钮
5\删除窗口中的所有字符(只有几个),替换为下面的内容:

Option Explicit
Public Sub AllInternalPasswords()
' Breaks worksheet and workbook structure passwords. Bob McCormick
' probably originator of base code algorithm modified for coverage
' of workbook structure / windows passwords and for multiple passwords
'
' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)
' Modified 2003-Apr-04 by JEM: All msgs to constants, and
' eliminate one Exit Sub (Version 1.1.1)
' Reveals hashed passwords NOT original passwords
Const DBLSPACE As String = vbNewLine & vbNewLine
Const AUTHORS As String = DBLSPACE & vbNewLine & _
"Adapted from Bob McCormick base code by" & _
"Norman Harker and JE McGimpsey"
Const HEADER As String = "AllInternalPasswords User Message"
Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04"
Const REPBACK As String = DBLSPACE & "Please report failure " & _
"to the microsoft.public.excel.programming newsgroup."
Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _
"now be free of all password protection, so make sure you:" & _
DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _
DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _
DBLSPACE & "Also, remember that the password was " & _
"put there for a reason. Don't stuff up crucial formulas " & _
"or data." & DBLSPACE & "Access and use of some data " & _
"may be an offense. If in doubt, don't."
Const MSGNOPWORDS1 As String = "There were no passwords on " & _
"sheets, or workbook structure or windows." & AUTHORS & VERSION
Const MSGNOPWORDS2 As String = "There was no protection to " & _
"workbook structure or windows." & DBLSPACE & _
"Proceeding to unprotect sheets." & AUTHORS & VERSION
Const MSGTAKETIME As String = "After pressing OK button this " & _
"will take some time." & DBLSPACE & "Amount of time " & _
"depends on how many different passwords, the " & _
"passwords, and your computer's specification." & DBLSPACE & _
"Just be patient! Make me a coffee!" & AUTHORS & VERSION
Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _
"Structure or Windows Password set." & DBLSPACE & _
"The password found was: " & DBLSPACE & "$$" & DBLSPACE & _
"Note it down for potential future use in other workbooks by " & _
"the same person who set this password." & DBLSPACE & _
"Now to check and clear other passwords." & AUTHORS & VERSION
Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _
"password set." & DBLSPACE & "The password found was: " & _
DBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _
"future use in other workbooks by same person who " & _
"set this password." & DBLSPACE & "Now to check and clear " & _
"other passwords." & AUTHORS & VERSION
Const MSGONLYONE As String = "Only structure / windows " & _
"protected with the password that was just found." & _
ALLCLEAR & AUTHORS & VERSION & REPBACK
Dim w1 As Worksheet, w2 As Worksheet
Dim i As Integer, j As Integer, k As Integer, l As Integer
Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer
Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
Dim PWord1 As String
Dim ShTag As Boolean, WinTag As Boolean
Application.ScreenUpdating = False
With ActiveWorkbook
WinTag = .ProtectStructure Or .ProtectWindows
End With
ShTag = False
For Each w1 In Worksheets
ShTag = ShTag Or w1.ProtectContents
Next w1
If Not ShTag And Not WinTag Then
MsgBox MSGNOPWORDS1, vbInformation, HEADER
Exit Sub
End If
MsgBox MSGTAKETIME, vbInformation, HEADER
If Not WinTag Then
MsgBox MSGNOPWORDS2, vbInformation, HEADER
Else
On Error Resume Next
Do 'dummy do loop
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
With ActiveWorkbook
.Unprotect Chr(i) & Chr(j) & Chr(k) & _
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
If .ProtectStructure = False And _
.ProtectWindows = False Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Application.Substitute(MSGPWORDFOUND1, _
"$$", PWord1), vbInformation, HEADER
Exit Do 'Bypass all for...nexts
End If
End With
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
If WinTag And Not ShTag Then
MsgBox MSGONLYONE, vbInformation, HEADER
Exit Sub
End If
On Error Resume Next
For Each w1 In Worksheets
'Attempt clearance with PWord1
w1.Unprotect PWord1
Next w1
On Error GoTo 0
ShTag = False
For Each w1 In Worksheets
'Checks for all clear ShTag triggered to 1 if not.
ShTag = ShTag Or w1.ProtectContents
Next w1
If ShTag Then
For Each w1 In Worksheets
With w1
If .ProtectContents Then
On Error Resume Next
Do 'Dummy do loop
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
.Unprotect Chr(i) & Chr(j) & Chr(k) & _
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
If Not .ProtectContents Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Application.Substitute(MSGPWORDFOUND2, _
"$$", PWord1), vbInformation, HEADER
'leverage finding Pword by trying on other sheets
For Each w2 In Worksheets
w2.Unprotect PWord1
Next w2
Exit Do 'Bypass all for...nexts
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
End With
Next w1
End If
MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER
End Sub

 
6\关闭编辑窗口
7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!

分享到:
评论

相关推荐

    Excel—“撤销工作表保护密码”的破解并获取原始密码

    Excel 撤销工作表保护密码 破解并获取原始密码

    EXCEL工作表保护密码破解方法

    通过上述方法,即使忘记了Excel工作表的保护密码,也能有效地解锁并编辑数据。不过,在日常工作中应尽量避免遗忘密码的情况发生,可以采取定期更换密码、记录密码等方式来加强数据安全。此外,在使用任何破解方法...

    Excel 撤销工作表保护

    然而,如果我们忘记了工作表保护的密码,或者我们需要撤销他人的工作表保护,那么我们就需要一种方法来撤销工作表保护。 撤销工作表保护的方法 Excel 中提供了两种方法来撤销工作表保护:使用“工具”菜单中的...

    撤销工作表保护密码

    在日常工作中,您是否遇到过这样的情况:您用Excel编制的报表、表格、程序等,在单元格中设置了公式、函数等,为了防止其他人修改您的设置或者防止您自己无意...您只要按照以下步骤操作,Excel工作表保护密码瞬间即破!

    2007版Excel表格—“撤销工作表保护密码”的破解并获取原始密码

    Excel 工作表保护密码破解 Excel 工作表保护密码是一种常用的保护方法,用于防止他人修改或访问工作表中的敏感数据。但是,有时我们可能忘记了保护密码,或者下载到的 Excel 文件已经加了保护密码,无法访问或修改...

    Excel-“撤销工作表保护密码”的破解并获取原始密码.zip

    在日常工作中,您是否遇到过这样的情况:您用Excel编制的报表、表格、程序等,在单元格中设置了公式、函数等,为了防止其他人修改您的设置或者防止您自己无意中...您只要按照以下步骤操作,Excel工作表保护密码瞬间即破

    Excel中如何破解“撤销工作表保护密码”并获取原始密码(20211008155336).pdf

    Excel中如何破解“撤销工作表保护密码”并获取原始密码(20211008155336).pdf

    解密Excel文件打开密码、解密excel工作表保护

    excel文件经常被我们用来存放很重要的数据文件,所以也就会对...想要解密打开密码的话,就需要找回excel文件的打开密码才能够解密,如果想要解密工作表保护,就简单很多,使用excel解密工具,可以直接撤销工作表保护

    Excel中如何破解“撤销工作表保护密码”并获取原始密码借鉴.pdf

    这段代码是一个专门用于破解Excel工作表保护密码的VBA宏,它通过特定算法尝试解除密码保护。请注意,这种方法揭示的是哈希密码,并非原始密码,且可能不适用于所有版本的Excel。 执行这个宏后,如果成功,工作表的...

    撤销工作表保护脚本

    ### 撤销工作表保护脚本的知识点详解 #### 一、脚本概述 该脚本主要用于解除Excel工作表的保护状态。当一个Excel工作表被设置了密码保护后,通常需要输入正确的密码才能对工作表进行修改。此脚本通过穷举法尝试所有...

    Excel—“撤销工作表保护密码”的破解并获取原始密码.pdf

    本文将详细介绍如何撤销Excel工作表保护密码,并揭示其中可能隐藏的原始密码。 首先,我们需要了解Excel的工作表保护是如何工作的。当您设置工作表保护时,Excel会使用一种哈希算法对您输入的密码进行处理,生成一...

    Excel撤销工作表保护密码图文教程介绍.docx

    本教程将向你展示如何通过录制宏来撤销Excel工作表的保护密码。 首先,你需要打开含有密码保护的工作簿。在Excel中,找到并打开你想要解除保护的文件。一旦文件被加载到Excel中,你可以开始录制宏以自动执行解密...

    Excel中如何破解“撤销工作表保护密码”并获取原始密码.pdf

    这段代码是专门用于破解Excel工作表密码的。 以下是一个示例VBA代码,用于破解工作表和工作簿结构密码: ```vba Option Explicit Public Sub AllInternalPasswords() ' Breaks worksheet and workbook structure ...

    Excel中如何破解“撤销工作表保护密码”并获取原始密码.doc

    在Excel中,有时我们会遇到需要撤销工作表保护密码的情况,可能是忘记了密码,或者需要编辑受保护的文件。本文将详细讲解如何在Excel中解除工作表的保护密码,并尝试获取原始密码。 首先,我们来了解如何保护Excel...

    Excel中如何破解“撤销工作表保护密码”并获取原始密码..docx

    以下将详细讲解如何在Excel中撤销工作表保护密码以及一种可能的破解方法。 首先,了解如何设置工作表保护: 1. 全选工作表,通过右键菜单选择“设置单元格格式”,在“保护”选项卡中取消勾选“锁定”和“隐藏”。 ...

    Excel密码保护的解除方法.docx

    在实际工作中,我们应当尊重文件的保护设置,如果忘记了自己的密码,可以尝试使用Excel内置的密码恢复工具,或者联系文件创建者寻求帮助。同时,为了保护自己的Excel文件,应定期备份,设置复杂的密码,并使用多层...

    Excel锁定单元格设置.docx

    1. 单击菜单栏的"工具"—"保护"—"撤销工作表保护"。 2. 在窗口中重新输入设置的密码,即可撤销工作表的锁定。 锁定单元格是 Excel 表格中的一种重要功能,可以保护我们的数据不被误操作或误删除。但是,需要注意的...

Global site tag (gtag.js) - Google Analytics