2007excel表格密码如何破解
发布时间:2023-05-21 20:07:58
excel2007里一些重要文件,我们都会选择加密,这时忘记密码了怎么办。下面让小编为你带来2007excel表格密码破解的方法。
2007excel表格密码破解方法:
1、打开您需要破解保护密码的Excel文件;
2、依次点击菜单栏上的工具—宏—-录制新宏,输入宏名字如:aa;
3、停止录制(这样得到一个空宏);
4、依次点击菜单栏上的工具—宏—-宏,选aa,点编辑按钮;
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
—————————————————————————————–
复制到横线以上
6、关闭编辑窗口;
7、依次点击菜单栏上的工具—宏—–宏,选AllInternalPasswords,运行,确定两次;
等一会,就会出现以下对话框:这就是Excel密码对应的原始密码(此密码和原先设置的密码都能打开此文档。如果是别人的文档,你又想恢复密码设置,就可以用此密码进行保护,他就能用他设置的密码打开,你可以试试,很有趣的。字母一定要大写):
关于2007excel表格密码破解的相关文章推荐:
1.excel2007工作簿密码破解的教程
2.excel2007密码破解
3.怎么破解excel2007密码


猜你喜欢
- 苹果今天面向开发人员发布了 macOS Big Sur 第六个测试版本,一起看看吧大家都知道,苹果今天面向开发人员发布了 macOS Big
- 根据苹果官方提供的建议,要想清除 Apple Pro Display XDR 和 iMac 的 Nano-texture 纳米纹理玻璃屏幕上
- 一、插入表格 在实际工作中,我们经常会在文档中插入表格,来表达一些综合性信息。在文档中插入表格有两种方法,即“插入表格”和“绘制表格”。 插
- WPS如何设计520创意表白文字?WPS流程图如何正确使用形状?WPS文字要制作520创意性的表白文字,使用流程图终止这个形状就可以。流程图
- 对我而言,如何学习PPT的方法和学别的软件方法没有任何不同,基本上就是三个套路。1、 要系统学习,看专业书籍2、 要接触灵感,看高手作品3、
- 在Excel中,批注是一件非常方便的事情,但是如果想要批量修改替换其中的某个关键词,一个个手动修改,那就麻烦了,这次为大家介绍的就是快速批量
- 我们在学习使用CAD相关软件的时候,总要选择一款趁手的CAD看图软件,方便我们对CAD图形进行观看和一些基础的操作。今天小编给大家推荐一款十
- 有时候,我们在网上下载的文档是pdf格式的,需要转换成word文档才可以进行编辑。小编觉得:可以借助PDF转Word破解版这一款软件来实现转
- 一般刚装的系统用优化软件整体优化一下后都很快,可是用着用着就变慢了。其实系统需要我们经常优化维护的,比如过一段时间就要对磁盘进行清理和碎片整
- 两个窗口的并排查看功能是在Word文档中经常用到的功能,这一功能使得两个窗口中的数据可以进行精确对比。以下是小编为您带来的关于在Word中并
- 我们在利用WPS表格和Excel表格进行日常办公时,经常需要给表格批量填充文本,如果我们一个一个的输入,会非常的麻烦且不高效,那么有没有什么
- Boss直聘是一款招聘软件,很多人找到工作之后,Boss上的简历还经常被查阅,时不时会接到一些招聘电话,这就让人很烦恼,知道隐藏简历,就不会
- 在 Mac 上工作时,可能某些方面没有达到应有的效率。 经常在这里和那里浪费时间,尤其是那些经常执行的任务。 在 Mac 上节省时间可以让您
- 无论有多少种方法,却只有一种方法是最快速、最高效的。这种方法就是快捷键操作。比如你要在excel表格中输入重复的内容时,最小白的办法就是直接
- 很多人都会说苹果手机都可以连接到Windows的共享文件,那么Mac不行么?当然可以,虽然说这两个电脑的系统不一样,但是只要在同一个局域网内
- 键盘是电脑中最重要的设备之一,打字离不开键盘,但是很多小伙伴都遇到过键盘按键失灵错乱的情况,很多人以为是键盘坏了,但是大多数并不是因为这个原
- 给大家讲解了word页码的设置的相关内容,大家可以先去了解下word页码设置。在我们使用word编写一个论文文档的时候,一般第一和第二页分别
- 在Word2010中有一个功能简直是太方便了:在早期的Word版本中,我们如果想要将插入到文档中的图片单独提取出来,通常的方法是将文档另存为
- 西瓜视频如何解绑银行卡?西瓜视频是一款热门的短视频软件,我们在里面绑定完银行卡,想要解绑,要怎么进行操作呢,下面就给大家分享西瓜视频解绑银行
- 北京时间8月8日早间消息,信息安全研究公司Check Point近期发现了高通处理器Android手机的4个新漏