破解加密excel的教程的方法步骤详解
发布时间:2023-08-09 17:23:50
在Excel中可能有些设置了密码保护却又忘记密码的重要数据,这个时候就需要破解加密保护的Excel文件了,下面是由小编分享的如何破解加密excel的教程,希望对你有用。
破解加密excel的教程
破解密码步骤1:打开受密码保护的工作表
破解加密excel的教程图1
破解密码步骤2:工具—宏—-录制新宏—输入名字如:hh
破解加密excel的教程图2
破解密码步骤3:停止录制(这样得到一个空宏)
破解加密excel的教程图3
破解密码步骤4:工具—宏—-宏,选hh,点编辑按钮
破解加密excel的教程图4
破解密码步骤5:删除窗口中的所有字符,替换为下面的内容:
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 & _ "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的教程图5
破解密码步骤6:关闭编辑窗口
破解密码步骤7:工具—宏—–运行,,等1分钟,再确定.OK,没有密码了


猜你喜欢
- win7升级更新到win10,很多用户在更新过程中会碰上提示更新错误,并且提示8024000b代码,这个问题是由于windows Updat
- 在Excel VBA中,如果需要查询Excel当前打印机名称以方便用户的操作,可通过VBA查询Excel当前打印机名称。Excel2003可
- 一、问题的提出我们在使用EXCEL过程中,有时需要将一个表中数据的“列”变为“行”,如图1、图2所示,需要将表2中引用表1的数据,将“列”转
- 5月是一年中结婚的高峰期。而婚礼邀请友人参加,就需要写请柬。而且写请柬不但要求字写得端正,还不能有错别字,再加上邀请的朋友多,写请柬就是一个
- Win10如何关闭office2013上载中心?在我们安装office2013的同时,office2013上载中心也安装上了,office2
- 大家在使用电脑的过程中有没有遇到这样的情况:电脑老是自动跳出需求帮助程序的功能的提示,检查了电脑也不清楚到底是哪里出现了问题。那下面小编就给
- 在excel文档中经常会用到批注,这样可以方便自己单独对某个单元格进行标注相关的内容。下面让小编为你带来excel表格删除备注的方法。exc
- 在文档处理中,有时候一些表格需要有斜线切割,在WPS文字中要怎样给表格画斜线呢?新手不会,上网找怕麻烦,而且教程太乱没有统一的答案怎么办,哪
- Windows7系统下默认的用户配置文件夹也是与Vista一样的,都是存储在c:\users,但把用户配置和系统完全放在一个分区时非常不方便
- Win11系统相比之前的操作系统,增加了很多新的功能,这也是为了可以提高用户的操作体验感,那有的用户想设置任务栏不合并窗口,但是不知道怎么操
- 最近有很多用户反映,在使用Win7系统的时候,自己电脑的麦克风声音忽大忽小的,这是什么原因呢?这可能是我们的麦克风开启了麦克风增强所导致的。
- 前面有给大家分享过Excel的筛选功能,今天给大家分享高级筛选查询数据,直接将需要的数据筛选到其他单元格。1、Excel根据人员信息筛选在众
- Win10系统如何添加本地账户?很多朋友们可能还不知道,下面小编就给大家带来Win10添加本地账户的方法,一起来看看吧Win10系统如何添加
- 掌上TGP怎么创建开黑房间?掌上TGP是一款非常好友的游戏辅助软件,玩英雄联盟的用户还可以在掌上TGP中创建开黑房间邀请好友一起玩,那么我们
- 壹号本2s是一款商务型办公笔记本电脑,搭载了英特尔酷睿m系列处理器以及集成显卡,能够满足用户们日常办公使用需求,那么壹号本2s笔记本如何使用
- 我们在更新安装了win10操作系统之后,有的小伙伴们发现桌面上的控制面板快捷方式没有了。想要打开控制面板还要在开始菜单中进行搜索,着实是有一
- 微信现在已经成为的现在当代人的聊天软件的主流,更是人人必备的社交聊天软件之一,那你知道微信中朋友圈怎么筛选日期的吗?接下来我们一起往下看看微
- 凭借免费、快捷、方便等优点,快压(kuaizip)获得了不少PC用户的青睐。值得一提的是,快压也是国内第一款具备自主压缩格式的软件!但近来却
- 【试题题目】 在PPT中绘制一个三角形,并让三角形绕一个顶点旋转,直到下一次单击。[注]
- win7桌面图标有个白色方块怎么去掉?有些win7用户发现自己的桌面图标出现了白色方块,这是怎么回事呢?应该怎么恢复原样呢?下面小编带来了解