2003版excel表格密码怎么去除
发布时间:2023-11-29 21:15:51
我们在工作中使用excel2003的时候,很久以前设置了密码的文档忘记了该如何打开。下面让小编为你带来2003版excel表格密码怎么去除的方法。
2003版excel表格密码去除步骤如下:
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
'
' China XingYun 27-Feb-2006 (Version 1.0.0)
' Modified 2006-Feb-28 by JEM: All msgs to constants, and
' eliminate one Exit Sub (Version 1.0.0)
' Reveals hashed passwords NOT original passwords
Const DBLSPACE As String = vbNewLine & vbNewLine
Const AUTHORS As String = DBLSPACE & vbNewLine & _
"Base code by" & _
"China XingYun"
Const HEADER As String = "AllInternalPasswords User Message"
Const VERSION As String = DBLSPACE & "Version 1.0.0 2006-Feb-28"
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 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密码对应的原始密码(此密码和原先设置的密码都能打开此文档。如果是别人的文档,你又想恢复密码设置,就可以用此密码进行保护,他就能用他设置的密码打开,你可以试试,很有趣的。字母一定要大写):
关于2003版excel表格密码去除的相关文章推荐:
1.取消excel2003密码的教程
2.2003excel表格如何撤销保护密码
3.2003excel表格密码怎么破解


猜你喜欢
- 许多用户目前的电脑操作系统依旧是Windows10系统,但是目前网络上很多很多的系统都是拥有非常多的软件,而随之而起的就是纯净版系统。那么纯
- 当设备提示“内存不足”,不少人都会选择加装内存条。除此之外,用户也可以修改电脑的虚拟内存,已增加运行内存!当然,并不是每一个用户都清楚虚拟内
- 通常来说,我们的电脑上都会有C盘、D盘、E盘、F盘等多个分区,不过有用户反应自己新买的电脑只有一个C盘,那么这种情况要怎么增加分区呢?毕竟有
- 如果你升级至macOS后,一定会发现到从第三方来源下载的App都会导致无法开启使用,导致会一直卡在未识别开发者的App警告提示画面中。下面我
- 许多用户在使用电脑的时候,基本都会使用到远程桌面连接,但是不少用户在使用的时候却遇到了一些问题,例如有些用户在使用的时候出现出现身份验证错误
- 在PPT演示文稿中我们经常会插入一些图片和形状用以丰富PPT的内容,同时增加文档的趣味性。通过PPT演示文稿中的合并形状功能,我们可以将图片
- 目前固态硬盘逐渐得到广泛的应用,一些新笔记本以及组装电脑也开始普遍采用固态硬盘平台,超级本就更不用说了,采用固态硬盘已经成标配化。虽然固态硬
- 通常,无论您拥有哪种计算机,Windows或Mac,恢复数据的步骤都非常相似。今天介绍的就是在Mac上进行数据恢复的教程要在计算机上恢复数据
- 除了常规的问题修复及功能改进外,钉钉官方偶尔也会在最新的版本中加入一些新功能。那么问题出现了,钉钉新版本功能在哪看?针对这一问题,小编今天为
- 本文将讲述如何在Microsoft Excel中取消隐藏所有隐藏的工作表。如何使用Excel VBA宏来取消隐藏工作簿中的所有工作表。通过V
- 我们在使用win10操作系统的时候,发现系统的布局都变了找不到控制面板在哪里了。对于这种问题,小编觉得可以尝试在开始中搜索或者是进入运行中进
- 最近在网上看到不少网友在询问并口硬盘和串口硬盘是什么,以及串并口硬盘的区别。这个问题对于一些电脑专业人员来说是一个比较简单的问题,不过很多电
- fastsearch是一款非常强大的本地搜索软件,该款软件是基于文件、文件夹名称的快速搜索引擎。FastSearch在搜索文件之前会把所用的
- 电脑蓝屏相信屏幕前只要使用过电脑的朋友几乎无一例外都曾遇到过,虽然蓝屏这种现象比较常见,但导致蓝屏的诱因则有较大的差异。这就好
- 在日常工作中,经常会从系统中导出一些表格,但这些系统表格往往是文本格式,用求和公式得出结果为0,如下图所示,这种情况,我们该怎么处理呢?&n
- Android虽然已经超越Windows成为全球用户最多的一套操作系统,可是因为Java的问题,谷歌和甲骨文的官司一直打到了现在。两周前,法
- 只要你的电脑是台式且组装,装上红警2资源,都不需要任何设置就可以顺利运行,由于微软将16位色从Win8上移除了,导致了红警2在Win8普通状
- 我们在使用电脑的过程中,总会遇到一些问题,最近有网友就遇到了msi电脑无限进入bios页面的情况,那么msi电脑无限进入bios页面怎么办呢
- 在excel2007中,OUARTILE函数的功能是获取数据集或数组的四分位数。OUARTILE函数的表达式为:QUARTILE(array
- 当要在Word 2007中使用其他程序中的数据时,有两种选择:链接或嵌入。事实上,尽管使用的术语不同,但是含义是相似的。例如,将图片插入到W