Excel工作表保护密码忘了怎么破解
发布网友
发布时间:2022-02-26 19:25
我来回答
共2个回答
热心网友
时间:2022-02-26 20:54
EXCEL工作表保护密码破解
方法:
1\打开文件
2\工具---宏----录制新宏---输入名字如:aa
3\停止录制(这样得到一个空宏)
4\工具---宏----宏,选aa,点编辑按钮
5\删除窗口中的所有字符(只有几个),替换为下面的内容:(复制吧)
6\关闭编辑窗口
7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!
内容如下:
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 'mmy 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
此方法,本人亲自试过,确实不错
感谢写出这段编码的同志
热心网友
时间:2022-02-26 22:12
测试,有用。非常好用!
Excel工作表忘记密码怎么办?
如果您的Excel工作表已设置了工作表保护,并且您忘记了密码,可以尝试以下方法:1. 使用另一个工作表 如果您有一个未受保护的工作表,可以将其复制到已受保护的工作表上。然后,删除已受保护的工作表上的所有单元格保护代码。最后,将复制的工作表删除。2. 使用另一个应用程序 如果您在另一个应用程...
excel密码忘了怎么办?
1、使用密码解除保护:点击Excel表格左上角的“审阅”选项卡,找到“撤销工作表保护”选项,输入正确的密码,即可解除保护。2、使用宏命令解除保护:如果知道Excel文件的密码,可以使用VBA宏命令来解除保护。打开Excel文件,按下Alt+F11键打开VBA编辑器,在代码窗口中输入以下代码:Application.UnprotectSheet (...
EXCEL工作表保护密码忘记了如何撤消工作表保护
1. **密码提示**:在输入密码时,Excel通常会显示密码提示,这有助于回忆密码。2. **尝试常见密码**:如果可能,尝试使用常见的密码组合,如“123456”、“password”等。3. **联系文件创建者**:如果工作表是由他人创建的,尝试联系他们以获取密码。4. **使用VBA宏**:如果熟悉VBA编程,可以尝试...
excel工作表保护密码忘记了怎么办?
1、把Excel文件的扩展名xlsx修改为Rar。瞬间Excel文件变成了压缩包。(如果不显示后辍 ,选中工具栏中的文件扩展名选项)。2、双击打开压缩包,找到xl- Worksheets,把受保护的工作表sheet1.xml 拖动复制出来。3、用记事本打开sheet1.xml文件,搜protect快速找到保护代码并删除,保护后把文件拖回到压缩包...
(解除excel表格的保护密码的操作步骤)excel忘记密码怎么解除
一、快速破解工作表保护密码 案例说明:如上图,我们设置工作表保护密码后,直接点击修改数据会提示需要撤销工作表保护,只要输入密码后才能修改数据。此时如果忘记密码就比较麻烦,下面就来学习如何破解工作表保护密码。密码破解:第一步:将我们加密的表格后缀名修改为RAR压缩包格式,修改后为.rar。双击压缩...
撤销工作表保护密码忘记了怎么办
1、先找到有工作表保护密码的Excel表格,然后将忘记密码的Excel文件名称后缀由.xlsx改为.rar,如果有提示可以忽略,一般不会造成什么影响。2、用压缩文件打开忘记密码的Excel文件,然后按以下步骤进行操作:xl——worksheets——sheet1.xml(这里是将sheet1工作表设置了保护密码,可根据实际情况选择相应文件名...
excel表格被设置了密码保护,无法更改,急需破解
excel密码保护破解方法一:小编这个Excel“客户销售明细表”文件,包含8张Excel工作表,其中第七张(sheet7)是“宁夏店”的销售数据。从图中,可以看到这个工作表是有密码的,单击“撤销工作表保护”,要求我们输入密码,可是密码忘记了,下面小编就一步一步档例带大家破解他。1、修改EXCEL文件扩展名 将...
excel密码忘记了怎样解锁
1. 打开受保护的 Excel 文件,输入密码,如果密码错误,会提示“口令不正确”。2. 如果你忘记了密码,可以点击“工具”选项卡中的“保护”按钮,然后选择“删除工作表保护”或“删除工作簿保护”选项。3. 如果文件受到强加的密码保护,你可以使用 WPS Office 提供的“密码破解向导”功能来解除密码保护...
工作表密码忘了怎么办 excel工作表保护密码忘记了怎么办?
1、Excel中设置了工作表保护,如果忘记了密码。2、先保存文件,并找到文件,选择后按下F2,将扩展名改为“rar”压缩文件格式。3、并双击用压缩软件打开,双击打开其中的xl文件夹。4、在其中找到“worksheets”文件夹,双击打开。5、找到设置了保护的工作表,选择后点击右键,选择“用记事本打开”。6、在打开...
excel被保护了怎么查看密码excel被保护了怎么查看密码呢
1、首先先找到有工作表保护密码的Excel表格,然后后缀名称,从演示操作表格.xlsx改为演示操作表格.rar,回车确定。2、然后用压缩文件打开,然后找到下面的路径,xl——worksheets——sheet1.xml(这里设置的保护密码,是sheet1工作表,如果是其他的表格,选择相应的名称即可)。3、然后把从压缩文件里面找到的...