Excel—“撤销工作表保护密码”的破解并获取原始密码

合集下载

EXCEL密码去除(工作表、工作薄密码保护破解)

EXCEL密码去除(工作表、工作薄密码保护破解)

各位朋友不知道有没有碰到过这样的情况,当你要打开一个EXECL工作表时,突然发现密码忘记了,唯一可做的也许是搞个破解软件来破一下,但针对打开后的工作表保护,一般就很难有效了,复制虽是一种办法,但不少数据(特别是公式较多着),可能就要乱套了,入户才能破解这一类密码呢?不久前在网上发现此精华,与大家共享一下!利用宏运行方式破解,真的很有效,运行中可能电脑有两分钟无反应,千万不要以为死机了,等等吧!步骤方法如下:1.打开文件2.工具---宏---录制新宏---输入名字如:aa3.停止录制(这样得到一个空宏)4.工具---宏----宏,选aa,点编辑按钮5.删除窗口中的所有字符(只有几个),替换为下面的内容:(复制吧)6.关闭编辑窗口7.工具---宏----宏。

选AllInternalPasswords,运行,确定两次,等两分钟,再确定,OK,没有密码了!!宏内容如下: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 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)'Reveals hashed passwords NOT original passwordsConst DBLSPACE As String = vbNewLine & vbNewLineConst AUTHORS As String = DBLSPACE & vbNewLine & _"Adapted form 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 proteection, 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 areason. Don't stuff up crucial formulas" & _"or date/" & DBLSPACE & "Access and use of some data" & _"may be an offense.If in doubt,don't."Const MSGNOPWPRDS1 As String = "There were no passwords on" & _"sheet,or workbook struture or windows." & AUTHORS & VERSION Const MSGNOPWORD2 As String = "There was no protection to" & _ "workbook structure or windows." & DBLSPACE & _"Proceeding to unprotect sheets." & AUTHORS & VERSIONConst 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 & _"Thq 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 & VERSIONConst MSGONL YONE As String = "Only structure / windows" & _ "protected with the password that was just found." & _ALLCLEAR & AUTHORS & VERSION & REPBACKDim w1 As Worksheet, w2 As WorksheetDim i As Integer, j As Integer, k As Integer, l As IntegerDim m As Integer, n As Integer, i1 As Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As IntegerDim PWord1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADER ElseOn Error Resume NextDo 'dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For 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(1) & Chr(m) & Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) If .ProtectStructure = False And _.ProtectWindows = False ThenPWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(1) & _Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)MsgBox Application.Substitute(MSGPWORDFOUND1, _ "$$", PWord1), vbInformation, HEADERExit Do 'Bypass all for…nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONL YONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triffered to 1 if not.ShTag = ShTag Or w1.ProtectContentsNext w1If ShTag ThenFor Each w1 In WorksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo 'Dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126.Unprotect Chr(i) & Chr(j) & Chr(k) & _Chr(1) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _Chr(i4) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)If Not .ProtectContents ThenPWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(1) & _Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)MsgBox Application.Substitute(MSGPWORDFOUND2, _"$$", PWord1), vbInformation, HEADER'leverrage finding Pword by trying on other sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for…nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER End Sub好了,经测试有效,祝各位成功!。

Excel黑科技:帮你破解Excel工作表保护密码和工作簿密码

Excel黑科技:帮你破解Excel工作表保护密码和工作簿密码

Excel黑科技:帮你破解Excel工作表保护密码和工作簿密码一、工作表密码破解在Excel中,为了保护自已的工作表不被修改,我们可以添加保护密码。

如果有一天密码忘了怎么办?如图1,撤消工作表保护需要输入密码。

图 1今天小编就教你一个绝大多数用户都不知道的黑科技:一招破解工作表保护密码。

操作步骤:Step1:把Excel文件的扩展名xlsx修改为Rar。

瞬间Excel文件变成了压缩包。

如果你的文件扩展名没有显示出来,请点击此电脑→查看→显示与隐藏,把文件扩展名前面的方框打勾,如图2。

图 2修改文件扩展名之前的文件图标长成这样,如图3:图 3点击右键修改文件扩展名为rar,提示如图4:图 4点击“是”,修改扩展名之后的文件图标变成这样了,如图5。

图 5Step2:双击打开压缩包,找到xl→Worksheets(如图6和图7),把受保护的工作表sheet1.xml(如图8)拖动复制出来。

图 6图 7图 8Step3、用记事本打开sheet1.xml文件,搜protect快速找到保护代码并删除,如图9和图10,保存后把文件拖回到压缩包中。

图 9图 10Step4、重新把后辍名由rar改回xlsx,打开Excel文件后发现工作表保护密码已删除,如图11。

图 11二、工作簿密码破解Excel工作簿保护后(审阅→保护工作簿),工作表无法插入、删除和取消隐藏等操作。

如果要撤销工作簿保护,必须输入密码,如图12:图 12如果忘记了密码怎么办?按照以下步骤操作可以解除密码。

操作步骤如下:Step1、在工作表标签右键菜单中点击“查看代码”,如图13,打开一个新的窗口(Visual baisc..编辑器),插入→模块,然后把下面的代码粘贴到右侧的空白窗口,如图14。

图 13代码Sub test()ActiveWorkbook.Sheets.CopyFor Each sh In ActiveWorkbook.Sheetssh.Visible = TrueNextEnd Sub图 14Step2、把光标放在代码中,点工具栏中的”运行”按钮,运行上面代码后,会把原文件另存为一个新的Excel文件,这时只需要重新保存即可。

如何解除ecel密码

如何解除ecel密码

Excel—“撤销工作表保护密码”的破解并获取原始密码在日常工作中,您是否遇到过这样的情况:您用Excel编制的报表、表格、程序等,在单元格中设置了公式、函数等,为了防止其他人修改您的设置或者防止您自己无意中修改,您可能会使用Excel的工作表保护功能,但时间久了保护密码容易忘记,这该怎么办有时您从网上下载的Excel格式的小程序,您想修改,但是作者加了工作表保护密码,怎么办您只要按照以下步骤操作,Excel工作表保护密码瞬间即破!1、打开您需要破解保护密码的Excel文件;2、依次点击菜单栏上的工具---宏----录制新宏,输入宏名字如:aa;3、停止录制(这样得到一个空宏);4、依次点击菜单栏上的工具---宏----宏,选aa,点编辑按钮;5、删除窗口中的所有字符(只有几个),替换为下面的内容;从横线下开始复制------------------------------------------------------------------------------------------Option ExplicitPublic 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' Modified 2003-Apr-04 by JEM: All msgs to constants, and' eliminate one Exit Sub (Version' Reveals hashed passwords NOT original passwordsConst DBLSPACE As String = vbNewLine & vbNewLineConst 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 2003-Apr-04"Const REPBACK As String = DBLSPACE & "Please report failure " & _"to the 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 & VERSIONConst MSGNOPWORDS2 As String = "There was no protection to " & _ "workbook structure or windows." & DBLSPACE & _"Proceeding to unprotect sheets." & AUTHORS & VERSIONConst 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 & VERSIONConst 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 & VERSIONConst MSGONLYONE As String = "Only structure / windows " & _ "protected with the password that was just found." & _ALLCLEAR & AUTHORS & VERSION & REPBACKDim w1 As Worksheet, w2 As WorksheetDim i As Integer, j As Integer, k As Integer, l As IntegerDim m As Integer, n As Integer, i1 As Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer Dim PWord1 As StringDim ShTag As Boolean, WinTag As Boolean= FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag OrNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADERElseOn Error Resume NextDo 'dummy do loopFor 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 ThenPWord1 = 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 (MSGPWORDFOUND1, _"$$", PWord1), vbInformation, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag OrNext w1If ShTag ThenFor Each w1 In WorksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo 'Dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For 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 ThenPWord1 = 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 (MSGPWORDFOUND2, _"$$", PWord1), vbInformation, HEADER'leverage finding Pword by trying on other sheetsFor Each w2 In WorksheetsPWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADEREnd Sub-----------------------------------------------------------------------------------------复制到横线以上6、关闭编辑窗口;7、依次点击菜单栏上的工具---宏-----宏,选AllInternalPasswords,运行,确定两次;等一会,就会出现以下对话框:这就是Excel密码对应的原始密码(此密码和原先设置的密码都能打开此文档。

撤销工作表保护密码忘记了怎么办

撤销工作表保护密码忘记了怎么办

撤销工作表保护密码忘记了怎么办
1、先找到有工作表保护密码的Excel表格,然后将忘记密码的Excel文件名称后缀由.xlsx改为.rar,如果有提示可以忽略,一般不会造成什么影响。

2、用压缩文件打开忘记密码的Excel文件,然后按以下步骤进行操作:xl——worksheets——sheet1.xml(这里是将sheet1工作表设置了保护密码,可根据实际情况选择相应文件名)。

3、从压缩文件里面找到sheet1.xml文件,然后拖拽至一个方便找到的位置(因为我们要对其要进行修改)。

然后将sheet1.xml文件右击选择用记事本打开方式打开。

4、然后搜索,“protection”,把从这一段代码,全部删除掉。

5、然后再把修改后的sheet1.xml文件,选择拖拽到压缩的工作薄中,选择替换掉即可,点击确定。

6、最后一步,和第一步相反,把文件名称后缀,由“演示表格.rar”重新更改“演示表格.xlsx”。

最后打开Excel表格,所有密码都取消了。

第 1 页共1 页。

破解撤销工作表保护密码的方法

破解撤销工作表保护密码的方法

破解撤销工作表保护密码的方法如果你忘记了Excel工作表的保护密码,或者不知道密码是什么,那么你可能会被拒绝编辑或修改工作表。

但是,有一些方法可以帮助你破解撤销Excel工作表的保护密码。

方法一:使用VBA代码破解工作表保护密码1. 打开Excel文件,并按下Alt + F11键进入VBA编辑器。

2. 在VBA编辑器中,选择工具>引用,然后勾选Microsoft Visual Basic for Applications扩展库。

3. 在VBA编辑器中,选择插入>模块,并复制以下代码到新模块中:Sub PasswordBreaker()'Breaks worksheet password protection.Dim i As Integer, j As Integer, k As IntegerDim l As Integer, m As Integer, n As IntegerDim i1 As Integer, i2 As Integer, i3 As IntegerDim i4 As Integer, i5 As Integer, i6 As IntegerOn Error Resume NextFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For 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 ActiveSheet.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 ActiveSheet.ProtectContents = False ThenMsgBox 'One usable password is ' & Chr(i) & Chr(j) & _ Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)Exit SubEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextEnd Sub4. 点击运行按钮,然后在Excel工作表上右键单击并选择“查看代码”选项。

撤销工作表保护密码

撤销工作表保护密码
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Application.Substitute(MSGPWORDFOUND1, _
"$$", PWord1), vbInformation, HEADER
Const MSGTAKETIME As String = "After pressing OK button this " & _
"will take some time." & DBLSPACE & "Amount of time " & _
"depends on how many different passwords, the " & _
Const REPBACK As String = DBLSPACE & "Please report failure " & _
"to the microsoft.public.excel.programming newsgroup."
Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _
Next w1
If Not ShTag And Not WinTag Then
MsgBox MSGNOPWORDS1, vbInformation, HEADERE Nhomakorabeait Sub

如何撤销工作表保护

如何撤销工作表保护

如何撤销工作表保护首先,打开Excel文件,找到你需要撤销保护的工作表。

然后,点击工具栏上的“审阅”选项卡,在“审阅”选项卡中找到“保护工作表”按钮。

在弹出的下拉菜单中,选择“撤销工作表保护”。

接着,系统会提示你输入工作表的密码,如果当初设置了密码的话。

输入正确的密码后,点击“确定”按钮即可完成工作表保护的撤销。

如果你忘记了当初设置的密码,那么就需要使用其他方法来撤销工作表保护了。

在这种情况下,你可以尝试以下方法:首先,复制下面的VBA代码:Sub UnprotectSheet()。

Dim ws As Worksheet。

For Each ws In Worksheets。

ws.Unprotect Password:="YourPassword"Next ws。

End Sub。

然后,按下“Alt + F11”打开VBA编辑器,在左侧的项目资源管理器中找到你的工作簿,双击打开它,然后在弹出的窗口中粘贴上面复制的VBA代码。

接着,替换代码中的“YourPassword”为你当初设置的密码,然后按下“F5”执行代码。

这样就可以撤销工作表的保护了。

除了使用VBA代码来撤销工作表保护外,你还可以尝试将工作表复制到一个新的工作簿中。

在新的工作簿中,工作表的保护将被自动撤销,这样你就可以对其进行修改了。

总的来说,撤销工作表保护并不复杂,只需要按照上述步骤进行操作即可。

无论是通过Excel自带的功能,还是通过VBA代码,都可以轻松实现对工作表保护的撤销。

希望以上内容对你有所帮助,谢谢阅读!。

瞬间破解Excel—“撤销工作表保护密码”

瞬间破解Excel—“撤销工作表保护密码”

瞬间破解Excel—“撤销工作表保护密码”您是否遇到过这样的情况……您用Excel编制的报表、表格、程序等,在单元格中设置了公式、函数等,为了防止其他人修改您的设置或者防止您自己无意中修改,您可能会使用Excel的工作表保护功能,但时间久了保护密码容易忘记,这该怎么办?有时您从网上下载的Excel格式的小程序,您想修改,但是作者加了工作表保护密码,怎么办?您只要按照以下步骤操作,Excel工作表保护密码瞬间即破!1、打开您需要破解保护密码的Excel文件;2、依次点击菜单栏上的工具---宏----录制新宏,输入宏名字如:aa;3、停止录制(这样得到一个空宏);4、依次点击菜单栏上的工具---宏----宏,选aa,点编辑按钮;5、删除窗口中的所有字符(只有几个),替换为下面的内容;从横线下开始复制--------------------------------------------------------------------- Option ExplicitPublic 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 passwordsConst DBLSPACE As String = vbNewLine & vbNewLineConst 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 & VERSIONConst 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 & VERSIONConst 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 & VERSIONConst MSGONLYONE As String = "Only structure / windows " & _ "protected with the password that was just found." & _ALLCLEAR & AUTHORS & VERSION & REPBACKDim w1 As Worksheet, w2 As WorksheetDim i As Integer, j As Integer, k As Integer, l As IntegerDim m As Integer, n As Integer, i1 As Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer Dim PWord1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADERElseOn Error Resume NextDo 'dummy do loopFor 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 ThenPWord1 = 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, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not.ShTag = ShTag Or w1.ProtectContentsNext w1If ShTag ThenFor Each w1 In WorksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo 'Dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For 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 ThenPWord1 = 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 sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER End Sub-----------------------------------------------------------------------------------------复制到横线以上6、关闭编辑窗口;7、依次点击菜单栏上的工具---宏-----宏,选AllInternalPasswords,运行,确定两次;等一会,就会出现以下对话框:这就是Excel密码对应的原始密码(此密码和原先设置的密码都能打开此文档。

Excel中工作表保护密码的撤销和破解方法

Excel中工作表保护密码的撤销和破解方法

Excel中工作表保护密码的撤销和破解方法
在excel中如果需要将单元格或者工作表锁定,设置为只读,就需要单击工具——保护——保护工作表——设置密码来完成。

保护工作表后,编辑或删除受保护的单元格,就会弹出“正在试图更改被保护的只读单元格或图表。

要想修改受保护单元格或图表的内容,请先使用“工具”菜单“保护”子菜单的“撤消工作表保护”命令。

这时可能需要输入密码。

”的窗口。

有时候时间久了,自己设置的密码忘了该怎么办呢?
如果是对VBA代码编写很熟悉,可以使用编写宏代码来移除工作表保护密码。

但如果对VBA代码不会的朋友,其实,通过密码破解软件也是不错的选择。

下面小编就针对软件破解工作表保护密码,做一些介绍。

在网上有许多专门为破解Excel各种密码而制作的软件,但小编推荐Advanced Office Password Recovery这款软件来破解密码。

它们的使用方法简单且破解速度极快。

下载安装完成后,运行软件,直接点击工具栏“打开文件”按钮,打开要破解的Excel文件,马上就可以看到解出相应的密码了。

这个软件的优点是可以直接知道该工作表的原始密码,而有些软件只能破解,但不会显示出工作表的原始密码。

Excel工作表(簿)保护密码忘了怎么办?

Excel工作表(簿)保护密码忘了怎么办?

Excel工作表(簿)保护密码忘了怎么办?在Excel中可以通过工作表保护那些不希望别人修改的区域:也可以保护工作簿,以防止某些关键的工作表被删除或者结构修改:但是,经常会遇到一个麻烦事:保护密码忘了怎么办?下面介绍一种非常简单的去除工作表和工作簿保护密码的方法:1. 去除工作表保护密码首先,在资源管理器中将设置了工作表保护密码的Excel文件名称中添加后缀:.zip,系统会提示你警告信息,忽略它,点击是。

如果系统中装了RAR之类的压缩软件,就可以双击改名后的文件,将其打开。

或者,在文件上点击鼠标右键,选择在Windows 资源管理器中打开,在上述目录结构中,双击进入“xl”目录:继续双击进入worksheets目录首先,这里列出了所有的以工作表名称命名的xml文件,例如,在我们的示例文件中,只有一个工作表,sheet1,所以只有一个文件:sheet1.xml,将其复制到另外的地方(如果有多个,就复制那个设置了工作表保护密码的文件)。

选择以记事本打开复制出来的sheet1.xml文件在记事本中,搜索protect,你会找到<sheeProtection ...... />这样的一节内容:将上图中蓝色部分标识的文字全部删除:关闭记事本,保存文件。

然后将修改后的sheet1.xml复制回去,覆盖原来的文件:关闭打开的zip文件夹资源管理器,然后将文件后缀中的.zip删除,点击是。

双击打开该文件,你会发现该工作表已经没有保护了:2. 去除工作簿保护密码同样,将设置了工作簿保护的Excel文件名称后面加上.zip后缀,并在资源管理器中打开:进入到xl目录,将其中的workbook.xml复制到其他目录,并用记事本打开:同样搜索protect,找到蓝色加亮的一节:<workbookProtection ....../>将其删除,并保存。

复制回刚才改名后的zip文件夹:去掉zip后缀,完成。

Excel黑科技:帮你破解Excel工作表保护密码和工作簿密码

Excel黑科技:帮你破解Excel工作表保护密码和工作簿密码

Excel黑科技:帮你破解Excel工作表保护密码和工作簿密码一、工作表密码破解在Excel中,为了保护自已的工作表不被修改,我们可以添加保护密码。

如果有一天密码忘了怎么办?如图1,撤消工作表保护需要输入密码。

图 1今天小编就教你一个绝大多数用户都不知道的黑科技:一招破解工作表保护密码。

操作步骤:Step1:把Excel文件的扩展名xlsx修改为Rar。

瞬间Excel文件变成了压缩包。

如果你的文件扩展名没有显示出来,请点击此电脑→查看→显示与隐藏,把文件扩展名前面的方框打勾,如图2。

图 2修改文件扩展名之前的文件图标长成这样,如图3:图 3点击右键修改文件扩展名为rar,提示如图4:图 4点击“是”,修改扩展名之后的文件图标变成这样了,如图5。

图 5Step2:双击打开压缩包,找到xl→Worksheets(如图6和图7),把受保护的工作表sheet1.xml(如图8)拖动复制出来。

图 6图 7图 8Step3、用记事本打开sheet1.xml文件,搜protect快速找到保护代码并删除,如图9和图10,保存后把文件拖回到压缩包中。

图 9图 10Step4、重新把后辍名由rar改回xlsx,打开Excel文件后发现工作表保护密码已删除,如图11。

图 11二、工作簿密码破解Excel工作簿保护后(审阅→保护工作簿),工作表无法插入、删除和取消隐藏等操作。

如果要撤销工作簿保护,必须输入密码,如图12:图 12如果忘记了密码怎么办?按照以下步骤操作可以解除密码。

操作步骤如下:Step1、在工作表标签右键菜单中点击“查看代码”,如图13,打开一个新的窗口(Visual baisc..编辑器),插入→模块,然后把下面的代码粘贴到右侧的空白窗口,如图14。

图 13代码Sub test()ActiveWorkbook.Sheets.CopyFor Each sh In ActiveWorkbook.Sheetssh.Visible = TrueNextEnd Sub图 14Step2、把光标放在代码中,点工具栏中的”运行”按钮,运行上面代码后,会把原文件另存为一个新的Excel文件,这时只需要重新保存即可。

Excel—“撤销工作表保护密码”的破解并获取原始密码

Excel—“撤销工作表保护密码”的破解并获取原始密码

Excel—“撤销工作表保护密码”的破解并获取原始密码在日常工作中,您是否遇到过这样的情况:您用Excel编制的报表、表格、程序等,在单元格中设置了公式、函数等,为了防止其他人修改您的设置或者防止您自己无意中修改,您可能会使用Excel的工作表保护功能,但时间久了保护密码容易忘记,这该怎么办?有时您从网上下载的Excel格式的小程序,您想修改,但是作者加了工作表保护密码,怎么办?您只要按照以下步骤操作,Excel工作表保护密码瞬间即破!1、打开您需要破解保护密码的Excel文件;2、依次点击菜单栏上的工具---宏----录制新宏,输入宏名字如:aa;3、停止录制(这样得到一个空宏);4、依次点击菜单栏上的工具---宏----宏,选aa,点编辑按钮;5、删除窗口中的所有字符(只有几个),替换为下面的内容;从横线下开始复制------------------------------------------------------------------------------------------Option ExplicitPublic 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 passwordsConst DBLSPACE As String = vbNewLine & vbNewLineConst 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 & VERSIONConst MSGNOPWORDS2 As String = "There was no protection to " & _ "workbook structure or windows." & DBLSPACE & _"Proceeding to unprotect sheets." & AUTHORS & VERSIONConst 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 & VERSIONConst 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 & VERSIONConst MSGONLYONE As String = "Only structure / windows " & _ "protected with the password that was just found." & _ ALLCLEAR & AUTHORS & VERSION & REPBACKDim w1 As Worksheet, w2 As WorksheetDim i As Integer, j As Integer, k As Integer, l As IntegerDim m As Integer, n As Integer, i1 As Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As IntegerDim PWord1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADER ElseOn Error Resume NextDo 'dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For 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 ThenPWord1 = 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, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag Or w1.ProtectContentsNext w1If ShTag ThenFor Each w1 In WorksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo 'Dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For 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 ThenPWord1 = 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 sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADEREnd Sub-----------------------------------------------------------------------------------------复制到横线以上6、关闭编辑窗口;7、依次点击菜单栏上的工具---宏-----宏,选AllInternalPasswords,运行,确定两次;等一会,就会出现以下对话框:这就是Excel密码对应的原始密码(此密码和原先设置的密码都能打开此文档。

Excel—“撤销工作表保护密码”的破解并获取原始密码

Excel—“撤销工作表保护密码”的破解并获取原始密码

Excel—“撤销工作表保护密码”的破解并获取原始密码Excel—“撤销工作表保护密码”的破解并获取原始密码.txt19“明”可理解成两个月亮坐在天空,相互关怀,相互照亮,缺一不可,那源源不断的光芒是连接彼此的纽带和桥梁!人间的长旅充满了多少凄冷孤苦,没有朋友的人是生活的黑暗中的人,没有朋友的人是真正的孤儿。

Excel—“撤销工作表保护密码”的破解并获取原始密码IT技术1、打开您需要破解保护密码的Excel文件;2、依次点击菜单栏上的工具---宏----录制新宏,输入宏名字如:aa;3、停止录制(这样得到一个空宏);4、依次点击菜单栏上的工具---宏----宏,选aa,点编辑按钮;5、删除窗口中的所有字符(只有几个),替换为下面的内容;Public Sub 工作表保护密码破解()Const DBLSPACE As String = vbNewLine & vbNewLineConst AUTHORS As String = DBLSPACE & vbNewLine & _"作者:XXXXXXX"Const HEADER As String = "工作表保护密码破解"Const VERSION As String = DBLSPACE & "版本 Version 1.1.1"Const REPBACK As String = DBLSPACE & ""Const ZHENGLI As String = DBLSPACE & " XXXXXXX"Const ALLCLEAR As String = DBLSPACE & "该工作簿中的工作表密码保护已全部解除!!" & DBLSPACE & "请记得另保存" _ & DBLSPACE & "注意:不要用在不当地方,要尊重他人的劳动成果!"Const MSGNOPWORDS1 As String = "该文件工作表中没有加密"Const MSGNOPWORDS2 As String = "该文件工作表中没有加密2"Const MSGTAKETIME As String = "解密需花费一定时间,请耐心等候!" & DBLSPACE & "按确定开始破解!"Const MSGPWORDFOUND1 As String = "密码重新组合为:" & DBLSPACE & "$$" & DBLSPACE & _"如果该文件工作表有不同密码,将搜索下一组密码并修改清除"Const MSGPWORDFOUND2 As String = "密码重新组合为:" & DBLSPACE & "$$" & DBLSPACE & _"如果该文件工作表有不同密码,将搜索下一组密码并解除"Const MSGONLYONE As String = "确保为唯一的?"Dim w1 As Worksheet, w2 As WorksheetDim i As Integer, j As Integer, k As Integer, l As IntegerDim m As Integer, n As Integer, i1 As Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer Dim PWord1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADER Exit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenElseOn Error Resume NextDo 'dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For 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 ThenPWord1 = 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, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADER Exit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag Or w1.ProtectContentsNext w1If ShTag ThenFor Each w1 In WorksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo 'Dummy do loopFor 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 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For 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 ThenPWord1 = 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 sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK & ZHENGLI, vbInformation, HEADEREnd Sub6、关闭编辑窗口;7、依次点击菜单栏上的工具---宏-----宏,选AllInternalPasswords,运行,确定两次;等一到两分钟,就会出现以下对话框:这就是Excel密码对应的原始密码(此密码和原先设置的密码都能打开此文档。

excel中撤销工作表保护密码并获取原始密码

excel中撤销工作表保护密码并获取原始密码

用宏代码破解密码:以为例说明,(2003也是一样的,只是菜单命令的位置不同)第一步:打开该文件,先解除默认的“宏禁用”状态,方法是点击工具栏下的“选项”状态按钮,打开“M i c r o s o f t O f f i c e安全选项”窗口,选择其中的“启用此内容”,“确定”退出;再切换到“视图”选项卡,点击“宏”→“录制宏”,出现“录制新宏”窗口,在“宏名”定义一个名称为:P a s s W o r d B r e a k e r,点击“确定”退出;第二步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“编辑”,打开“M i c r o s o f t V i s u a l B a s i c”编辑器,用如下内容替换右侧窗口中的所有代码:S u b P a s s w o r d B r e a k e r() D i m i A s I n t e g e r,j A s I n t e g e r,k A s I n t e g e r D i m l A s I n t e g e r,m A s I n t e g e r,n A s I n t e g e r D i m i1A s I n t e g e r,i2A s I n t e g e r,i3A s I n t e g e r D i m i4A s I n t e g e r,i5A s I n t e g e r,i6A s I n t e g e r O n E r r o r R e s u m e N e x t F o r i=65T o66:F o r j=65T o66:F o r k=65T o6 6 F o r l=65T o66:F o r m=65T o66:F o r i1=65T o6 6 F o r i2=65T o66:F o r i3=65T o66:F o r i4=65T o6 6 F o r i5=65T o66:F o r i6=65T o66:F o r n=32T o12 6 A c t i v e S h e e t.U n p r o t e c t C h r(i)&C h r(j)&C h r(k)&_C h r(l)&C h r(m)&C h r(i1)&C h r(i2)&C h r(i3)&_ C h r(i4)&C h r(i5)&C h r(i6)&C h r(n) I f A c t i v e S h e e t.P r o t e c t C o n t e n t s=F a l s e T h e n M s g B o x"O n e u s a b l e p a s s w o r d i s"&C h r(i)&C h r(j)&_ C h r(k)&C h r(l)&C h r(m)&C h r(i1)&C h r(i2)&_ C h r(i3)&C h r(i4)&C h r(i5)&C h r(i6)&C h r(n) A c t i v e W o r k b o o k.S h e e t s(1).S e l e c t R a n g e("a1").F o r m u l a R1C1=C h r(i)&C h r(j)&_ C h r(k)&C h r(l)&C h r(m)&C h r(i1)&C h r(i2)&_ C h r(i3)&C h r(i4)&C h r(i5)&C h r(i6)&C h r(n) E x i t S u b E n d I f N e x t:N e x t:N e x t:N e x t:N e x t:N e x t N e x t:N e x t:N e x t:N e x t:N e x t:N e x t E n d S u b第三步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“执行”,密码就现形了。

excel取消工作表保护

excel取消工作表保护

excel取消工作表保护
在使用Excel时,我们经常会对工作表进行保护,以防止他人对我们的数据进
行意外修改。

但是,有时候我们也需要取消工作表的保护,以便对数据进行修改或者进行其他操作。

接下来,我将向大家介绍如何在Excel中取消工作表的保护。

首先,打开你需要取消保护的Excel文件。

在Excel菜单栏中找到“审阅”选
项卡,点击“保护工作表”按钮。

在弹出的下拉菜单中,选择“取消工作表保护”。

接着,系统会要求你输入取消保护所需的密码。

如果工作表没有设置密码保护,那么你只需要直接点击“确定”按钮即可取消保护。

如果工作表设置了密码保护,那么你需要输入正确的密码才能取消保护。

在输入正确的密码后,点击“确定”按钮,系统会提示你工作表的保护已经取消。

此时,你就可以对工作表进行修改或者其他操作了。

需要注意的是,取消工作表保护后,其他用户也可以对工作表进行修改。

因此,在进行操作后,记得重新对工作表进行保护,以防止数据的意外修改。

另外,有时候我们可能会忘记了工作表的密码,导致无法取消保护。

这时,我
们可以尝试使用一些专业的密码破解工具来帮助我们找回密码,从而取消工作表的保护。

总的来说,取消Excel工作表的保护并不复杂,只需要几个简单的步骤就可以
完成。

希望通过本文的介绍,可以帮助大家更好地应对在Excel中取消工作表保护
的问题。

如何解除e cel密码

如何解除e cel密码

Excel—“撤销工作表保护密码”的破解并获取原始密码在日常工作中,您是否遇到过这样的情况:您用Excel编制的报表、表格、程序等,在单元格中设置了公式、函数等,为了防止其他人修改您的设置或者防止您自己无意中修改,您可能会使用Excel的工作表保护功能,但时间久了保护密码容易忘记,这该怎么办?有时您从网上下载的Excel格式的小程序,您想修改,但是作者加了工作表保护密码,怎么办?您只要按照以下步骤操作,Excel工作表保护密码瞬间即破!1、打开您需要破解保护密码的Excel文件;2、依次点击菜单栏上的工具---宏----录制新宏,输入宏名字如:aa;3、停止录制(这样得到一个空宏);4、依次点击菜单栏上的工具---宏----宏,选aa,点编辑按钮;5、删除窗口中的所有字符(只有几个),替换为下面的内容;从横线下开始复制------------------------------------------------------------------------------------------Option ExplicitPublic 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' Modified 2003-Apr-04 by JEM: All msgs to constants, and' eliminate one Exit Sub (Version' Reveals hashed passwords NOT original passwordsConst DBLSPACE As String = vbNewLine & vbNewLineConst 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 2003-Apr-04"Const REPBACK As String = DBLSPACE & "Please report failure " & _"to the 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 & VERSIONConst MSGNOPWORDS2 As String = "There was no protection to " & _"workbook structure or windows." & DBLSPACE & _ "Proceeding to unprotect sheets." & AUTHORS & VERSIONConst 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 & VERSIONConst MSGONLYONE As String = "Only structure / windows " & _ "protected with the password that was just found." & _ ALLCLEAR & AUTHORS & VERSION & REPBACKDim w1 As Worksheet, w2 As WorksheetDim i As Integer, j As Integer, k As Integer, l As IntegerDim m As Integer, n As Integer, i1 As Integer, i2 As IntegerDim i3 As Integer, i4 As Integer, i5 As Integer, i6 As IntegerDim PWord1 As StringDim ShTag As Boolean, WinTag As Boolean= FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag OrNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADERElseOn Error Resume NextDo 'dummy do loopFor 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 ThenPWord1 = 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 (MSGPWORDFOUND1, _"$$", PWord1), vbInformation, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADER Exit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag OrNext w1If ShTag ThenFor Each w1 In WorksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo 'Dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66For 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 ThenPWord1 = 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 (MSGPWORDFOUND2, _"$$", PWord1), vbInformation, HEADER'leverage finding Pword by trying on other sheetsFor Each w2 In WorksheetsPWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADEREnd Sub-----------------------------------------------------------------------------------------复制到横线以上6、关闭编辑窗口;7、依次点击菜单栏上的工具---宏-----宏,选AllInternalPasswords,运行,确定两次;等一会,就会出现以下对话框:这就是Excel密码对应的原始密码(此密码和原先设置的密码都能打开此文档。

Excel中表格工作表保护密码撤销步骤及有效代码

Excel中表格工作表保护密码撤销步骤及有效代码

Excel中表格工作表保护密码撤销步骤及有效代码步骤:1、打开excel,点击菜单栏的“视图”,点击二级菜单里的“宏”,选择录制宏2、在弹出来的方框中输入宏的名称,点击确认3、视图—点击二级菜单里的“宏”—选择停止录制4、视图—点击二级菜单里的“宏”—选择查看宏—选之前新建的宏—点击编辑按钮5、删除窗口中的所有字符6、复制下面的有效代码,关闭编辑窗口。

Option ExplicitPublic 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 passwordsConst DBL SPA CE As String = vbNewLine & vbNewLineConst 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 & VERSIONConst 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 & VERSIONConst 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 & VERSIONConst 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 & VERSIONConst MSGONLYONE As String = "Only structure / windows " & _ "protected with the password that was just found." & _ ALLCLEAR & AUTHORS & VERSION & REPBACKDim w1 As Worksheet, w2 As WorksheetDim i As Integer, j As Integer, k As Integer, l As IntegerDim 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 P Word1 As StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADERElseOn Error Resume NextDo 'dummy do loopFor 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 ThenPWord1 = 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, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag Or w1.ProtectContentsNext w1If ShTag ThenFor Each w1 In WorksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo 'Dummy do loopFor i = 65 To 66: For j = 65 To 66: For k = 65 To 66For 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 ThenPWord1 = 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 sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADEREnd Sub7、视图—宏—查看宏,选AllInternalPasswords,点击执行,连点几个确定密码撤销完毕。

excel取消工作表保护的方法

excel取消工作表保护的方法

excel取消工作表保护的方法
要取消Excel工作表的保护,您可以按照以下步骤进行操作:
1. 打开您想要取消保护的工作表。

2. 在Excel菜单栏中选择“审阅”选项卡。

3. 在“审阅”选项卡中,找到并点击“取消工作表保护”按钮。

4. 如果工作表受密码保护,系统将提示您输入密码。

5. 输入正确的密码,然后点击“确定”。

6. 如果密码正确,工作表的保护将被取消,您现在可以对工作
表进行编辑和修改。

另外,如果您忘记了工作表的密码,可以尝试使用一些第三方
工具来解除密码保护。

但请注意,使用第三方工具可能存在安全风险,因此请谨慎使用。

总之,取消Excel工作表的保护非常简单,只需要按照上述步骤进行操作即可。

希望这些信息能够帮助到您。

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

[分享] Excel—“撤销工作表保护密码”的破解并获取原始密码[复制链接]在日常工作中,您是否遇到过这样的情况:您用Excel编制的报表、表格、程序等,在单元格中设置了公式、函数等,为了防止其他人修改您的设置或者防止您自己无意中修改,您可能会使用Excel的工作表保护功能,但时间久了保护密码容易忘记,这该怎么办?有时您从网上下载的Excel格式的小程序,您想修改,但是作者加了工作表保护密码,怎么办?您只要按照以下步骤操作,Excel工作表保护密码瞬间即破!1、打开您需要破解保护密码的Excel文件;2、依次点击菜单栏上的工具---宏----录制新宏,输入宏名字如:aa;3、停止录制(这样得到一个空宏);4、依次点击菜单栏上的工具---宏----宏,选aa,点编辑按钮;5、删除窗口中的所有字符(只有几个),替换为下面的内容;从横线下开始复制------------------------------------------------------------------------------------------Option ExplicitPublic 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 passwordsConst DBLSPACE As String = vbNewLine & vbNewLineConst 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 & VERSIONConst 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 & VERSIONConst 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 & VERSIONConst MSGONLYONE As String = "Only structure / windows " & _ "protected with the password that was just found." & _ ALLCLEAR & AUTHORS & VERSION & REPBACKDim w1 As Worksheet, w2 As WorksheetDim i As Integer, j As Integer, k As Integer, l As IntegerDim 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 StringDim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = FalseWith ActiveWorkbookWinTag = .ProtectStructure Or .ProtectWindowsEnd WithShTag = FalseFor Each w1 In WorksheetsShTag = ShTag Or w1.ProtectContentsNext w1If Not ShTag And Not WinTag ThenMsgBox MSGNOPWORDS1, vbInformation, HEADERExit SubEnd IfMsgBox MSGTAKETIME, vbInformation, HEADERIf Not WinTag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADERElseOn Error Resume NextDo 'dummy do loopFor 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 ThenPWord1 = 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, HEADERExit Do 'Bypass all for...nextsEnd IfEnd WithNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfIf WinTag And Not ShTag ThenMsgBox MSGONLYONE, vbInformation, HEADERExit SubEnd IfOn Error Resume NextFor Each w1 In Worksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 In Worksheets'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag Or w1.ProtectContentsNext w1If ShTag ThenFor Each w1 In WorksheetsWith w1If .ProtectContents ThenOn Error Resume NextDo 'Dummy do loopFor 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 ThenPWord1 = 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 sheetsFor Each w2 In Worksheetsw2.Unprotect PWord1Next w2Exit Do 'Bypass all for...nextsEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextLoop Until TrueOn Error GoTo 0End IfEnd WithNext w1End IfMsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADEREnd Sub-----------------------------------------------------------------------------------------复制到横线以上6、关闭编辑窗口;7、依次点击菜单栏上的工具---宏-----宏,选AllInternalPasswords,运行,确定两次;等一会,就会出现以下对话框:这就是Excel密码对应的原始密码(此密码和原先设置的密码都能打开此文档。

相关文档
最新文档