? excel是办公软件Microsoftoffice的组件之一,win7正式版系统电脑在工作中使用excel工作表的时候,一些重要的文件咱们都会给它设置上密码。但是时间久了,容易把密码忘记了,那么有什么办法可以破解excel工作表密码呢?接下去咱们一起分享电脑破解excel工作表密码的办法。
?具体办法如下:
1、打开excel工作表;
2、然后在Excel表中找到【视图】;
3、点开【宏】;
4、然后选中【录制宏】;
5、接着会跳出一个窗口,打开【确定】;
6、在此点开【宏】,打开【停止录制】;
7、然后再打开【宏】,跳出窗口打开【编辑】;
8、然后打开【模板1】,并清空右边红框里的代码;
9、然后把破解代码复制粘贴进入空白处;
10、然后在打开【查看宏】,打开执行破解代码;
11、会跳出一个框,是英文的,看不懂没关系,打开确定,解密需要一段时间;
破解代码:
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
上述就是电脑破解excel工作表密码的办法,希望此教程内容能够借助到我们。
相关系统推荐
更新时间:2025-02-26
绿茶系统最新64位win11增强无死机版v2025.03集成最常用的办公娱乐维护工具,常用软件,一站式到.....
更新时间:2021-04-11
大地系统Ghost Win8.1 64位 青春装机版 2021.04GHO方式封装,多种安装方式供用户选择,安装再.....
更新时间:2021-04-11
番茄花园Ghost Win7 64位 多驱动装机版 2021.04确保系统安全稳定,集成了自2000-2021年笔记本电.....
更新时间:2021-09-08
雨林木风win7 64位 免激活小白稳定版v2021.10统计电源使用占比,用户轻松了解电量使用情况,一键.....
日期:04-111891
日期:12-012701
日期:04-112266
日期:04-112033
日期:02-262086
日期:04-114611