Excel有密码如何汉化?Excel密码汉化办法教程?
Excel密码汉化办法有许多,最常见的就是使用密码字典去解读,解读成功即为汉化,而本次使用的是宏命令,若是您还在一筹莫展,可以看看下文中的办法,因为涉及Excel重要文件,若是别人的东西,请获取授权!
Excel密码汉化办法教程:
1、进入加密的 Excel 用快捷命令Alt+F8 打开宏命令 窗口。
2、在宏名一栏中 输入宏的名字 随意健入直接。
3、输入完宏名后 创建的按钮就亮了 点击创建 你们就可以来到 新的界面了。
4、将编辑框内的sub knife( )End sub删除 将下列代码 复制 上去。
- 01option Explicit
- 02public sub Allinternalpasswords()
- 03' Breaks worksheet and workbook structure passwords. Bob McCormick
- 04' probably originator of base code algorithm modified for coverage
- 05' of workbook structure / win passwords and for multiple passwords
- 06'
- 07' norman Harker and JE McGimpsey 27-dec-2002 (Version 1.1)
- 08' Modified 2003-Apr-04 by JEM: All msgs to constants, and
- 09' eliminate one Exit sub (Version 1.1.1)
- 10' Reveals hashed passwords noT original passwords
- 11Const dBLspACE As string = vbnewLine & vbnewLine
- 12Const AuTHoRs As string = dBLspACE & vbnewLine & _
- 13"Adapted from Bob McCormick base code by" & _
- 14"norman Harker and JE McGimpsey"
- 15Const HEAdER As string = "Allinternalpasswords user Message"
- 16Const VERsion As string = dBLspACE & "Version 1.1.1 2003-Apr-04"
- 17Const REpBACK As string = dBLspACE & "please report failure " & _
- 18"to the microsoft.public.excel.programming newsgroup."
- 19Const ALLCLEAR As string = dBLspACE & "The workbook should " & _
- 20"now be free of all password protection, so make sure you:" & _
- 21dBLspACE & "sAVE iT now!" & dBLspACE & "and also" & _
- 22dBLspACE & "BACKup!, BACKup!!, BACKup!!!" & _
- 23dBLspACE & "Also, remember that the password was " & _
- 24"put there for a reason. don't stuff up crucial formulas " & _
- 25"or data." & dBLspACE & "Access and use of some data " & _
- 26"may be an offense. if in doubt, don't."
- 27Const MsGnopwoRds1 As string = "There were no passwords on " & _
- 28"sheets, or workbook structure or win." & AuTHoRs & VERsion
- 29Const MsGnopwoRds2 As string = "There was no protection to " & _
- 30"workbook structure or win." & dBLspACE & _
- 31"proceeding to unprotect sheets." & AuTHoRs & VERsion
- 32Const MsGTAKETiME As string = "After pressing oK button this " & _
- 33"will take some time." & dBLspACE & "Amount of time " & _
- 34"depends on how many different passwords, the " & _
- 35"passwords, and your computer's specification." & dBLspACE & _
- 36"Just be patient! Make me a coffee!" & AuTHoRs & VERsion
- 37Const MsGpwoRdFound1 As string = "You had a worksheet " & _
- 38"structure or win password set." & dBLspACE & _
- 39"The password found was: " & dBLspACE & "$$" & dBLspACE & _
- 40"note it down for potential future use in other workbooks by " & _
- 41"the same person who set this password." & dBLspACE & _
- 42"now to check and clear other passwords." & AuTHoRs & VERsion
- 43Const MsGpwoRdFound2 As string = "You had a worksheet " & _
- 44"password set." & dBLspACE & "The password found was: " & _
- 45dBLspACE & "$$" & dBLspACE & "note it down for potential " & _
- 46"future use in other workbooks by same person who " & _
- 47"set this password." & dBLspACE & "now to check and clear " & _
- 48"other passwords." & AuTHoRs & VERsion
- 49Const MsGonLYonE As string = "only structure / win " & _
- 50"protected with the password that was just found." & _
- 51ALLCLEAR & AuTHoRs & VERsion & REpBACK
- 52dim w1 As worksheet, w2 As worksheet
- 53dim i As integer, j As integer, k As integer, l As integer
- 54dim m As integer, n As integer, i1 As integer, i2 As integer
- 55dim i3 As integer, i4 As integer, i5 As integer, i6 As integer
- 56dim pword1 As string
- 57dim shTag As Boolean, winTag As Boolean
- 58Application.screenupdating = False
- 59with Activeworkbook
- 60winTag = .protectstructure or .protectwin
- 61End with
- 62shTag = False
- 63For Each w1 in worksheets
- 64shTag = shTag or w1.protectContents
- 65next w1
- 66if not shTag And not winTag Then
- 67MsgBox MsGnopwoRds1, vbinformation, HEAdER
- 68Exit sub
- 69End if
- 70MsgBox MsGTAKETiME, vbinformation, HEAdER
- 71if not winTag Then
- 72MsgBox MsGnopwoRds2, vbinformation, HEAdER
- 73Else
- 74on Error Resume next
- 75do 'dummy do loop
- 76For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
- 77For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
- 78For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
- 79For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
- 80with Activeworkbook
- 81.unprotect Chr(i) & Chr(j) & Chr(k) & _
- 82Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
- 83Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
- 84if .protectstructure = False And _
- 85.protectwin = False Then
- 86pword1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
- 87Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
- 88Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
- 89MsgBox Application.substitute(MsGpwoRdFound1, _
- 90"$$", pword1), vbinformation, HEAdER
- 91Exit do 'Bypass all for...nexts
- 92End if
- 93End with
- 94next: next: next: next: next: next
- 95next: next: next: next: next: next
- 96Loop until True
- 97on Error GoTo 0
- 98End if
- 99if winTag And not shTag Then
- 100MsgBox MsGonLYonE, vbinformation, HEAdER
- 101Exit sub
- 102End if
- 103on Error Resume next
- 104For Each w1 in worksheets
- 105'Attempt clearance with pword1
- 106w1.unprotect pword1
- 107next w1
- 108on Error GoTo 0
- 109shTag = False
- 110For Each w1 in worksheets
- 111'Checks for all clear shTag triggered to 1 if not.
- 112shTag = shTag or w1.protectContents
- 113next w1
- 114if shTag Then
- 115For Each w1 in worksheets
- 116with w1
- 117if .protectContents Then
- 118on Error Resume next
- 119do 'dummy do loop
- 120For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
- 121For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
- 122For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
- 123For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
- 124.unprotect Chr(i) & Chr(j) & Chr(k) & _
- 125Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
- 126Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
- 127if not .protectContents Then
- 128pword1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
- 129Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
- 130Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
- 131MsgBox Application.substitute(MsGpwoRdFound2, _
- 132"$$", pword1), vbinformation, HEAdER
- 133'leverage finding pword by trying on other sheets
- 134For Each w2 in worksheets
- 135w2.unprotect pword1
- 136next w2
- 137Exit do 'Bypass all for...nexts
- 138End if
- 139next: next: next: next: next: next
- 140next: next: next: next: next: next
- 141Loop until True
- 142on Error GoTo 0
- 143End if
- 144End with
- 145next w1
- 146End if
- 147MsgBox ALLCLEAR & AuTHoRs & VERsion & REpBACK, vbinformation, HEAdER
- 148End sub
option Explicitpublic sub Allinternalpasswords()' Breaks worksheet and workbook structure passwords. Bob McCormick' probably originator of base code algorithm modified for coverage' of workbook structure / win 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 passwordsConst dBLspACE As string = vbnewLine & vbnewLineConst 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 win." & AuTHoRs & VERsionConst MsGnopwoRds2 As string = "There was no protection to " & _"workbook structure or win." & dBLspACE & _"proceeding to unprotect sheets." & AuTHoRs & VERsionConst 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 & VERsionConst MsGpwoRdFound1 As string = "You had a worksheet " & _"structure or win 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 & VERsionConst 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 & VERsionConst MsGonLYonE As string = "only structure / win " & _"protected with the password that was just found." & _ALLCLEAR & AuTHoRs & VERsion & REpBACKdim w1 As worksheet, w2 As worksheetdim i As integer, j As integer, k As integer, l As integerdim m As integer, n As integer, i1 As integer, i2 As integerdim i3 As integer, i4 As integer, i5 As integer, i6 As integerdim pword1 As stringdim shTag As Boolean, winTag As BooleanApplication.screenupdating = Falsewith ActiveworkbookwinTag = .protectstructure or .protectwinEnd withshTag = FalseFor Each w1 in worksheetsshTag = shTag or w1.protectContentsnext w1if not shTag And not winTag ThenMsgBox MsGnopwoRds1, vbinformation, HEAdERExit subEnd ifMsgBox MsGTAKETiME, vbinformation, HEAdERif not winTag ThenMsgBox MsGnopwoRds2, vbinformation, HEAdERElseon Error Resume nextdo 'dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126with 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 _.protectwin = False Thenpword1 = 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, HEAdERExit do 'Bypass all for...nextsEnd ifEnd withnext: next: next: next: next: nextnext: next: next: next: next: nextLoop until Trueon Error GoTo 0End ifif winTag And not shTag ThenMsgBox MsGonLYonE, vbinformation, HEAdERExit subEnd ifon Error Resume nextFor Each w1 in worksheets'Attempt clearance with pword1w1.unprotect pword1next w1on Error GoTo 0shTag = FalseFor Each w1 in worksheets'Checks for all clear shTag triggered to 1 if not.shTag = shTag or w1.protectContentsnext w1if shTag ThenFor Each w1 in worksheetswith w1if .protectContents Thenon Error Resume nextdo 'dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For 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 Thenpword1 = 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 sheetsFor Each w2 in worksheetsw2.unprotect pword1next w2Exit do 'Bypass all for...nextsEnd ifnext: next: next: next: next: nextnext: next: next: next: next: nextLoop until Trueon Error GoTo 0End ifEnd withnext w1End ifMsgBox ALLCLEAR & AuTHoRs & VERsion & REpBACK, vbinformation, HEAdEREnd sub
5、关上 宏窗口 回到Excel下 按ALT+F8 重新打开 宏命令窗口。
6、您会发现 您前面输入的宏名 变成了Allinternalpasswords 点击执行 会出现如下对话框 点确定。
7、一直点 确定 直到不在 出现对话框为止。
8、等待 一段之间之后 系统会 再次跳出对话框 再点确定 保护就汉化成功了。
!!!注:上述办法仅作为参考教材,请勿用于非法途径。
上述内容就是Excel密码汉化办法的操作步骤,下次请用户在配置Excel密码的时候尽或许的容易一些,并记录下密码备份,避免再次需要使用宏。(责任编辑:chenhai)