excel表格加密文档的解密教程(excel文档加密方法)
Excel中的加密文档有时候需要进行解密处理,但是很多人不知道怎么操作,不要着急,小编告诉你excel表格加密文档的解密教程,希望阅读过后对你有所启发!
加密文档解密步骤1:打开您需要激活成功教程的Excel文件,如图所示:
加密文档解密步骤2:依次点击菜单栏上的工具—宏—-录制新宏;
加密文档解密步骤3:输入宏名字(PS:打击积极性啊!)如:易尔拓,然后停止录制(这样得到一个空宏,为后面添加vb代码做准备);
加密文档解密步骤4:依次点击菜单栏上的工具—宏—-宏,选易尔拓,点编辑按钮;
删除窗口中的所有字符,替换为下面的内容;
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 & _</p><p>"Note it down for potential future use in other workbooks by " & _</p><p>"the same person who set this password." & DBLSPACE & _</p><p>"Now to check and clear other passwords." & AUTHORS & VERSION</p><p>Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _</p><p>"password set." & DBLSPACE & "The password found was: " & _</p><p>DBLSPACE & "\)\(" & DBLSPACE & "Note it down for potential " & _</p><p>"future use in other workbooks by same person who " & _</p><p>"set this password." & DBLSPACE & "Now to check and clear " & _</p><p>"other passwords." & AUTHORS & VERSION</p><p>Const MSGONLYONE As String = "Only structure / windows " & _</p><p>"protected with the password that was just found." & _</p><p>ALLCLEAR & AUTHORS & VERSION & REPBACK</p><p>Dim w1 As Worksheet, w2 As Worksheet</p><p>Dim i As Integer, j As Integer, k As Integer, l As Integer</p><p>Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer</p><p>Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer</p><p>Dim PWord1 As String</p><p>Dim ShTag As Boolean, WinTag As Boolean</p><p>Application.ScreenUpdating = False</p><p>With ActiveWorkbook</p><p>WinTag = .ProtectStructure Or .ProtectWindows</p><p>End With</p><p>ShTag = False</p><p>For Each w1 In Worksheets</p><p>ShTag = ShTag Or w1.ProtectContents</p><p>Next w1</p><p>If Not ShTag And Not WinTag Then</p><p>MsgBox MSGNOPWORDS1, vbInformation, HEADER</p><p>Exit Sub</p><p>End If</p><p>MsgBox MSGTAKETIME, vbInformation, HEADER</p><p>If Not WinTag Then</p><p>MsgBox MSGNOPWORDS2, vbInformation, HEADER</p><p>Else</p><p>On Error Resume Next</p><p>Do 'dummy do loop</p><p>For i = 65 To 66: For j = 65 To 66: For k = 65 To 66</p><p>For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66</p><p>For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66</p><p>For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126</p><p>With ActiveWorkbook</p><p>.Unprotect Chr(i) & Chr(j) & Chr(k) & _</p><p>Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _</p><p>Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)</p><p>If .ProtectStructure = False And _</p><p>.ProtectWindows = False Then</p><p>PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _</p><p>Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _</p><p>Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)</p><p>MsgBox Application.Substitute(MSGPWORDFOUND1, _</p><p>"\)\(", PWord1), vbInformation, HEADER</p><p>Exit Do 'Bypass all for...nexts</p><p>End If</p><p>End With</p><p>Next: Next: Next: Next: Next: Next</p><p>Next: Next: Next: Next: Next: Next</p><p>Loop Until True</p><p>On Error GoTo 0</p><p>End If</p><p>If WinTag And Not ShTag Then</p><p>MsgBox MSGONLYONE, vbInformation, HEADER</p><p>Exit Sub</p><p>End If</p><p>On Error Resume Next</p><p>For Each w1 In Worksheets</p><p>'Attempt clearance with PWord1</p><p>w1.Unprotect PWord1</p><p>Next w1</p><p>On Error GoTo 0</p><p>ShTag = False</p><p>For Each w1 In Worksheets</p><p>'Checks for all clear ShTag triggered to 1 if not.</p><p>ShTag = ShTag Or w1.ProtectContents</p><p>Next w1</p><p>If ShTag Then</p><p>For Each w1 In Worksheets</p><p>With w1</p><p>If .ProtectContents Then</p><p>On Error Resume Next</p><p>Do 'Dummy do loop</p><p>For i = 65 To 66: For j = 65 To 66: For k = 65 To 66</p><p>For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66</p><p>For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66</p><p>For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126</p><p>.Unprotect Chr(i) & Chr(j) & Chr(k) & _</p><p>Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _</p><p>Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)</p><p>If Not .ProtectContents Then</p><p>PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _</p><p>Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _</p><p>Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)</p><p>MsgBox Application.Substitute(MSGPWORDFOUND2, _</p><p>"\)$”, 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
加密文档解密步骤5:依次点击菜单栏上的工具—宏—–宏,选AllInternalPasswords,执行,确定两次;
耐心等一会,再点击两次确定,就ok啦!
1.excel加密文件怎么解密的教程
2.如何激活成功教程加密excel的教程
3.怎么给excel2007加密和解密
4.Excel2013如何加密文档
5.Excel文件密码激活成功教程汇总
6.excel2003文档加密的教程
7.怎么给excel2013表格加密
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们 处理,核实后本网站将在24小时内删除侵权内容。
<p style="font-weight: normal;">可能的错误原因</p>
讯享网
请复制上方错误信息到搜索引擎以获取关于该错误的说明,或点击「使用必应搜索」。
如果您是访客,这说明网站程序可能出现了一些错误。请您稍后再试,或联系站长。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/206701.html