Excel怎样破解密码保护

打开宏窗口:点击“文件”按钮;点击“选项”按钮;点击“自定义功能区”;在“开发工具”前面打上对号;点击确定完成设置;在功能区选择,“开发工具”-“Visual Basic”。

方法1,
搜索以下代码:
'如果撤消工作表保护:
Worksheets("Sheet2").Unprotect "已知密码"
'如果撤消工作簿保护:
WorkBooks.Open Filename:="文件名",Password:=“已知密码"

方法2:
1,新建宏 录制新宏随便输入个名字如hong 点击“确定”按钮
2,停止录制
3,选择刚才所建的宏然后点击“编辑”按钮,会弹出代码编写窗口
4,将下面的代码全部复制并替换原来的字符,填写完毕后保存
5,运行刚刚保存的宏,破解成功

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 BooleanApplication.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密码保护?相关推荐

  1. 破解Excel 密码保护

    Excel加密虽然不能防止能打开的人通过复制等操作外泄,但至少也是一防较好的防线.移除Excel 2013的密码保护方法如下: 点击"Office"按钮,再选择"另存为& ...

  2. 破解excel密码保护

    1.设置过密码,打不开excel 如果保护的是整个工作簿,该如何破解密码呢?这里教大家一招,快速破解. 同样是打开VBA内容,然后在模块中输入以下代码: Sub 工作簿破解() ActiveWorkb ...

  3. 破解EXCEL工作表保护密码

    原文地址: https://www.mr-wu.cn/crack-excel-workbook-protection/ 其原理是通过Excel的宏功能,利用下边提供的VBA代码,来破解Excel工作表 ...

  4. 破解excel格式保护

    #筛选用 import pandas as pd import numpy as np import re #pd.options.display.max_columns = None pd.set_ ...

  5. Excel密码保护的解除方法与解除原理

    Excel密码保护的解除方法与解除原理 Excel弹出"您试图更改的单元格或图表受保护,因而是只读的.若要修改受保护单元格或图表,请先使用'撤消工作表保护'命令(在'审阅'选项卡的'更改'组 ...

  6. 解除Excel密码保护大全

    转自:http://hi.baidu.com/uniwinjz/item/ef26dcdbfff5b43849e1dd72 一.Excel"工程不可查看"两种实现方法及破解 关于E ...

  7. [转载]如何破解Excel VBA密码

    原文链接:http://yhf8377.blog.163.com/blog/static/1768601772012102111032840/ 在此之前,先强调一下,这个方法只是用来破解Excel内部 ...

  8. python 暴力破解 excel加密文件

    python 暴力破解 excel加密文件 'wordlist.txt' 为待测试的密码列表 fdd ddd eeee 5e5e5 58d85d5e d2d4d5d 4d4d4d3 dfdf,d; l ...

  9. 深入讲解破解Excel Vba工程密码

    Notice:虽然网上好多破解的教程,但是因为EXCEL版本时有更新,很多小白都不知道怎么破解,这边做一个举一反三的教程,做到vba excel工程密码几乎全部可以破解. 这边先给出一遍参考文章: h ...

最新文章

  1. php查看隐藏内容,隐藏index.php
  2. 三星叫停公司分拆重组计划:否认李在镕行贿
  3. [转]redis的三种启动方式
  4. AVL树和红黑树区别
  5. 找出一堆数中最小的前K个数
  6. 五、MongoDB的索引
  7. Appium+PythonUI自动化之webdriver 的三种等待方式(强制等待、隐式等待、显示等待)
  8. Greenplum segment级问题的排查 - gp_session_role=utility (含csvlog日志格式解读)
  9. 【BZOJ3930】[CQOI2015]选数 莫比乌斯反演
  10. PAT 乙级1014 福尔摩斯的约会(C语言)
  11. 利用D3D抓取GPU数据
  12. mac 查看环境变量_Mac开工利器Homebrew介绍
  13. 不要网上乱拷贝代码了!一段网上找的代码把公司服务器崩了!
  14. Ping++中的AlipaySDK和AlicloudUTDID冲突解决方案
  15. matlab fprintf_工程优化设计与Matlab实现——十进制编码遗传算法
  16. 第十章 隐马尔可夫模型
  17. 怎么用pr(Premiere)给视频添加水印
  18. java的类型_java数据类型
  19. 番外7林芝·救赎之旅的最后一站——混合现实科幻《地与光》
  20. mac系统node安装指定版本

热门文章

  1. 劳易测测距传感器ODS9L2.8/LAK-650-M12
  2. 腾讯为Facebook发布QQ Chat
  3. 扇贝英语听力单词识记
  4. 老将出马,一个顶俩?
  5. mysql关系型数据库的优点和缺点_关系型数据库和非关系型数据库的区别和特点...
  6. 16万装饰复古家 独享130平欧式生活
  7. matlab处理大量数据
  8. js实现全屏漂浮广告可关闭
  9. ERR_PNPM_META_FETCH_FAIL GET https://registry.npmjs.org/@webpack-cli%2Fserve: request to https://re
  10. 介绍Android中的Paint和Canvas的概念和使用方法