EXCEL文件去掉工作表保护密码的方法
excel解除表格保护的方法步骤
excel解除表格保护的方法步骤在Excel中录入太多的重要数据,这个时候就需要用到密码保护的方法进行保护,或许很多人都会设置密码保护,但有些朋友不会解除表格保护,下面是由店铺分享的excel解除表格保护的方法,希望对你有用。
excel解除表格保护的方法解除表格保护步骤1:打开要保护的excel解除表格保护步骤2:选择“审阅”选项,可以在该页面的工具栏上看到有一个“保护工作表”的工具栏excel解除表格保护的方法图2解除表格保护步骤3:点击该按钮,打开“保护工作表”对话框。
在该对话框中,需要设定一个取消保护工作表时的密码,以及保护工作表后,允许进行的操作,将允许的操作前面的复选框选中,即点击打上“√”excel解除表格保护的方法图3解除表格保护步骤4:点击“确定”按钮,弹出确定密码的对话框,输入“保护工作表”页面中设定的密码,然后点击确定excel解除表格保护的方法图4解除表格保护步骤5:此时,如果再在工作表页面中输入数据或修改数据时,会弹出该工作表被保护的提示信息。
excel解除表格保护的方法图5解除表格保护步骤6:当想编辑该文档的时候,执行取消保护工作表操作就可以了。
和设定保护工作表时的操作类似,打开要编辑的excel文档,选择审阅,可以看到原来“保护工作表”的工具变为“撤销保护工作表”的工具excel解除表格保护的方法图6解除表格保护步骤7:点击“撤销保护工作表”按钮,会弹出“撤销保护工作表”对话框,在编辑框中输入设定“保护工作表”时的密码,然后点击“确定”按钮excel解除表格保护的方法图7解除表格保护步骤8:回到excel工作表编辑区,发现可以编辑文档了。
excel文档保护怎么取消一、首先,打开Excel程序,打开要取消保护的excel表格,然后在Excel程序上方找到“审阅”点击打开。
二、然后在“审阅”菜单中,点击选择“撤销工作表保护”。
三、然后,在弹出的“撤销工作表保护”对话框中输入密码。
Excel撤销工作表保护密码的破解并获取原始密码
' eliminate one Exit Sub (Version 1.1.1)
' Breaks worksheet and workbook structure passwords. Bob McCormick 破解Excel工作表和工作薄保护密码.
' probably originator of base code algorithm modified for coverage Bob McCormick 基于覆盖工作薄窗口/所有工作表内容密码保护而制作
' DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & DBLSPACE & "Also, remember that the password was " & _
& DBLSPACE & "获取和使用的一些数据可能是一种犯罪行为. 如有疑问,不知道." '声明常量_字符型
'Const MSGNOPWORDS1 As String = "There were no passwords on " & "sheets, or workbook structure or windows." & AUTHORS & VERSION '声明常量_字符型
Excel撤销工作表保护密码图文教程介绍
r workbooks by same person who " & _"set this password." & DBLSPACE &
"Now to check and clear " & _"other passwords." & AUTHORS & VERSIONCo
nst MSGonLYONE As String="only structure / windows " & _"protected wit
rotection, 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.
or 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 126With ActiveWorkbook.Unprotec
t Chr(i) & Chr(j) & Chr(k) & _Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _C
Excel用VBA去除工作表保护密码
Excel用VBA去除工作表保护密码Excel 的工作表保护是非常脆弱的。
下面的VBA代码虽然不能找出工作表保护密码,但可以取消工作表保护,如果自己的工作表保护密码忘记了,可以用这个方法:1.按Alt+F11,打开VBA编辑器。
2.在“工程”窗口中选择要取消保护的工作表名称,单击菜单“插入→模块”。
3.在右侧的代码窗口中输入下列代码:Sub Remove_WorkSheet_Password()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 NextIf ActiveSheet.ProtectContents = False ThenMsgBox "该工作表没有保护密码!"Exit SubEnd IfFor 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 126ActiveSheet.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 "已经解除了工作表保护!"Exit SubEnd IfNext: Next: Next: Next: Next: NextNext: Next: Next: Next: Next: NextEnd Sub4.关闭VBA编辑器,回到工作表中,按Alt+F8,打开“宏”对话框,选择“Remove_WorkSheet_Password”,并单击“执行”按钮。
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. BobMcCormick' 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-20XX (Version 1.1)' Modified 20XX-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 20XX-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 & 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 & 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 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 Then MsgBox MSGNOPWORDS2, vbInformation, HEADERElseOn 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(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 Worksheets With 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密码对应的原始密码(此密码和原先设置的密码都能打开此文档。
Excel密码保护的解除方法 解除写保护
Excel密码保护的解除方法解除写保护Excel弹出“您试图更改的单元格或图表受保护,因而是只读的。
若要修改受保护单元格或图表,请先使用‘撤消工作表保护’命令(在‘审阅’选项卡的‘更改’组中)来取消保护。
可能会提示您输入密码。
”窗口,如图1。
出现这种情况,应该怎么解决呢?经过研究,找到了两种破解Excel工作表保护码的方法。
一、VBA宏代码破解法:第一步:打开该文件,先解除默认的“宏禁用”状态,方法是点击工具栏下的“选项”状态按钮,打开“Microsoft Office安全选项”窗口,选择其中的“启用此内容”,“确定”退出(图2);Excel密码保护的解除方法与解除原理Excel弹出“您试图更改的单元格或图表受保护,因而是只读的。
若要修改受保护单元格或图表,请先使用‘撤消工作表保护’命令(在‘审阅’选项卡的‘更改’组中)来取消保护。
可能会提示您输入密码。
”窗口,如图1。
出现这种情况,应该怎么解决呢?经过研究,找到了两种破解Excel工作表保护码的方法。
一、VBA宏代码破解法:第一步:打开该文件,先解除默认的“宏禁用”状态,方法是点击工具栏下的“选项”状态按钮,打开“Microsoft Office安全选项”窗口,选择其中的“启用此内容”,“确定”退出(图2);再切换到“视图”选项卡,点击“宏”→“录制宏”,出现“录制新宏”窗口,在“宏名”定义一个名称为:Password Breaker(图3),点击“确定”退出;第二步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“编辑”,打开“Microsoft Visual Basic”编辑器,用如下内容替换右侧窗口中的所有代码:Sub PasswordBreaker()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 66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126ActiveSheet.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)ActiveWorkbook.Sheets(1).SelectRange("a1").FormulaR1C1 = 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 Sub第三步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“执行”,密码就现形了(图4)。
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 ActiveWorkbookWinT ag = .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 WinT ag ThenMsgBox MSGNOPWORDS2, vbInformation, HEADER ElseOn 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 WinT ag 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工作簿的密码保护
打开工作簿,然后单击表编辑区域上方菜单栏上的“文件”。
在“文件”下拉列表选项中,将光标移到“信息”,然后在右侧显示的设置选项中,单击“保护工作簿”下拉箭头。
在列表选项中选择“用密码加密”打开“加密文档”对话框。
在“加密文档”对话框中,删除以前在框中设置的密码,然后单击“确定”删除工作簿的密码。
单击“保存”按钮保存以前的设置。
关闭工作簿后,无需输入密码即可再次打开它。
打开工作簿,然后单击表编辑区域上方菜单栏上的“文件”。
破解工作表保护密码的vba方法
破解工作表保护密码的vba方法一、概述工作表保护是Excel中一种常见的安全措施,可以防止他人对工作表进行修改。
然而,有时候我们自己忘记了保护密码,这就给我们的工作带来了一定的困扰。
今天我们将讨论一种破解工作表保护密码的vba方法,希望能够帮助到有需要的读者。
二、VBA简介VBA是Visual Basic for Applications的缩写,是一种用于宏编程的编程语言。
通过VBA,我们可以在Excel中编写自动化程序来完成一系列操作,包括破解工作表保护密码。
三、破解工作表保护密码的VBA方法1. 通过VBA删除保护密码我们需要打开需要破解保护密码的Excel文件,然后按下Alt + F11,进入VBA编辑器。
在VBA编辑器中,我们可以输入以下代码来删除保护密码:```Sub UnprotectSheet()Dim ws As WorksheetOn Error Resume NextFor Each ws In ThisWorkbook.Worksheetsws.Unprotect "YourPassword" '将"YourPassword"替换成实际的密码Next wsOn Error GoTo 0End Sub```在上面的代码中,我们通过循环遍历所有的工作表,并使用Unprotect方法来删除保护密码。
需要注意的是,代码中的“YourPassword”需要替换成实际的密码。
2. 通过VBA破解密码如果我们忘记了保护密码,我们也可以通过VBA来破解密码。
以下是一个简单的破解密码的VBA代码:```Sub CrackSheetPassword()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 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 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 Sub```这段代码通过嵌套循环的方式尝试穷举所有可能的密码组合,直到找到可以破解保护密码的组合为止。
Excel中工作表保护密码的撤销和破解方法
Excel中工作表保护密码的撤销和破解方法
在excel中如果需要将单元格或者工作表锁定,设置为只读,就需要单击工具——保护——保护工作表——设置密码来完成。
保护工作表后,编辑或删除受保护的单元格,就会弹出“正在试图更改被保护的只读单元格或图表。
要想修改受保护单元格或图表的内容,请先使用“工具”菜单“保护”子菜单的“撤消工作表保护”命令。
这时可能需要输入密码。
”的窗口。
有时候时间久了,自己设置的密码忘了该怎么办呢?
如果是对VBA代码编写很熟悉,可以使用编写宏代码来移除工作表保护密码。
但如果对VBA代码不会的朋友,其实,通过密码破解软件也是不错的选择。
下面小编就针对软件破解工作表保护密码,做一些介绍。
在网上有许多专门为破解Excel各种密码而制作的软件,但小编推荐Advanced Office Password Recovery这款软件来破解密码。
它们的使用方法简单且破解速度极快。
下载安装完成后,运行软件,直接点击工具栏“打开文件”按钮,打开要破解的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工作表的保护密码步骤如下:1、打开您需要破解保护密码的Excel文件;2、依次点击菜单栏上的工具---宏----录制新宏,输入宏名字如:001;3、停止录制(这样得到一个空宏);4、依次点击菜单栏上的工具---宏----宏,选001,点编辑按钮;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 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 66For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66For 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 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,运行,确定两次;8、完成。
wpsexcel表格忘记工作表保护密码怎么办?
wpsexcel表格忘记⼯作表保护密码怎么办?wps/excel考勤表格忘记修改⼯作表保护默认密码怎么办?考勤⼯作表密码破解?
在我们的⽇常⽣活中,⽤到密码的地⽅很多,同样在我们的⼯作中,同样也会⽤到!特别是⼯
作中,由于经常性的换⼈,交接不好,导致好多⼯作表的密码等你接⼿的时候都不知道,想编
辑⼜编辑不了,怎么办呢?好烦躁。
下⾯我们以考勤打卡记录为例来讲⼀下忘记⼯作表保护密码怎么样撤销⼯作表保护?
1. 打开清除密码系统
2. 启动宏(默认启⽤的则忽略此步骤)
3. 点击按钮“清除密码”
4. 选择你要清除密码的⽂件,需要是.xls 或者.xlsx 格式
5. 如出现输⼊密码的提⽰框,点击“取消”按钮,⼀直出现就⼀直点
6. 出现提⽰,则密码清除完成。
亲测清除密码有效率基本达到99.999%,需要清除密码系统的可以私我哦!6.6。
Excel表格为了密码怎么样取消工作表保护密码
The kind of people who blindly look forward to but never act are a breeding ground for the plague.悉心整理助您一臂(页眉可删)Excel表格为了密码怎么样取消工作表保护密码Excel表格怎么样取消工作表保护密码?在做excel表格时我们有时候会给自己的工作表加密,一旦忘记密码就会很麻烦,如何绕过密码,直接撤销?请看下面的Excel中进行取消工作表保护密码的设置步骤吧!打开excel,点击菜单栏的“视图”,点击二级菜单里的“宏”,选择录制宏。
在弹出来的.方框中输入宏的名称,点击确认。
重复第一步的步骤,不过这次点击“停止录制”。
选择查看宏。
编辑宏。
在弹出来的代码框输入下面的代码。
Option ExplicitPublic Sub AllInternalPasswords()Breaks worksheet and workbook structure passwords. Bob McCormickprobably originator of base code algorithm modified for coverageof workbook structure / windows passwords and for multiple passwordsNorman Harker and JE McGimpsey 27-Dec- (Version 1.1) Modified -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-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. Dont stuff up crucial formulas " _"or data." DBLSPACE "Access and use of some data " _ "may be an offense. If in doubt, dont."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 computers 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 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 " _。
如何去掉Excel密码保护
如何去掉Excel密码保护Excel弹出“您试图更改的单元格或图表受保护,因而是只读的。
若要修改受保护单元格或图表,请先使用‘撤消工作表保护’命令(在‘审阅’选项卡的‘更改’组中)来取消保护。
可能会提示您输入密码。
”窗口,如图1。
出现这种情况,应该怎么解决呢?经过研究,找到了两种破解Excel工作表保护码的方法。
一、VBA宏代码破解法:第一步:打开该文件,先解除默认的“宏禁用”状态,方法是点击工具栏下的“选项”状态按钮,打开“Microsoft Office安全选项”窗口,选择其中的“启用此内容”,“确定”退出(图2);再切换到“视图”选项卡,点击“宏”→“录制宏”,出现“录制新宏”窗口,在“宏名”定义一个名称为:PasswordBreaker(图3),点击“确定”退出;第二步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“编辑”,打开“Microsoft V isual Basic”编辑器,用如下内容替换右侧窗口中的所有代码:Sub PasswordBreaker()Dim i As Integer, j As Integer, k As Integer Dim l As Integer, m As Integer, n As Integer Dim i1 As Integer, i2 As Integer, i3 As Integer Dim i4 As Integer, i5 As Integer, i6 As Integer On Error Resume Next For 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 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 Then MsgBox "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) ActiveWorkbook.Sheets(1).Select Range("a1").FormulaR1C1 = 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 Sub End If Next: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next End Sub第三步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“执行”,密码就现形了(图4)。
excel工作表保护破解
excel工作表保护破解Excel工作表保护破解。
在日常工作中,我们经常会使用Excel表格来存储和处理数据。
为了保护数据的安全性,我们经常会对Excel工作表进行保护。
但有时候我们会遇到需要修改或编辑被保护的工作表的情况,这就需要我们学会如何破解Excel工作表的保护。
破解Excel工作表保护并不是一件复杂的事情,下面我将向大家介绍几种常用的方法。
第一种方法是通过VBA代码来破解Excel工作表保护。
首先,我们需要按下Alt + F11组合键,打开VBA编辑器。
然后在新建的模块中输入以下代码:Sub UnprotectSheet()。
Dim ws As Worksheet。
For Each ws In ThisWorkbook.Worksheets。
ws.Unprotect Password:="yourpassword"Next ws。
End Sub。
在上面的代码中,yourpassword是你设置的工作表保护密码。
执行完上述代码后,所有工作表的保护都会被解除。
第二种方法是通过在线工具来破解Excel工作表保护。
有一些在线工具可以帮助我们破解Excel工作表的保护,例如LostMyPass、Password-Find等。
我们只需要上传被保护的Excel文件,这些工具就可以帮我们破解保护密码。
第三种方法是通过修改Excel文件的扩展名来破解Excel工作表保护。
我们可以将Excel文件的扩展名修改为.zip,然后解压缩这个压缩文件。
在解压缩后的文件夹中,我们可以找到xl目录,里面包含了workbook.xml和worksheets文件夹。
我们可以用记事本打开workbook.xml文件,找到<workbookProtection>节点,将其删除或者修改为<workbookProtection lockStructure="0" lockWindows="0"/>,然后保存文件。
Excel密码保护的解除方法与解除原理
Excel密码保护的解除方法与解除原理-+++个人推荐Excel密码保护的解除方法与解除原理朋友们,是否由遇到过忘记Excel保护密码的情况,今天偶也碰到的。
网了好久最后再天极找到了这篇文章,写的真好。
用宏的办法,用Miscrosoft的东西解决Miscrosoft的问题,真是管用。
不过需要花费点时间。
后面的软件的话,好像只能破解打开密码。
个人推荐:法一,宏破解好东西不敢独享。
希望对大家由所帮助。
Excel弹出“您试图更改的单元格或图表受保护,因而是只读的。
若要修改受保护单元格或图表,请先使用‘撤消工作表保护’命令(在‘审阅’选项卡的‘更改’组中)来取消保护。
可能会提示您输入密码。
”窗口,如图1。
出现这种情况,应该怎么解决呢?经过研究,找到了两种破解Excel工作表保护码的方法。
一、VBA宏代码破解法:第一步:打开该文件,先解除默认的“宏禁用”状态,方法是点击工具栏下的“选项”状态按钮,打开“Microsoft Office安全选项”窗口,选择其中的“启用此内容”,“确定”退出(图2);再切换到“视图”选项卡,点击“宏”→“录制宏”,出现“录制新宏”窗口,在“宏名”定义一个名称为:PasswordBreaker(图3),点击“确定”退出;第二步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“编辑”,打开“Microsoft Visual Basic”编辑器,用如下内容替换右侧窗口中的所有代码:Sub PasswordBreaker()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 66For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126ActiveSheet.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)ActiveWorkbook.Sheets(1).SelectRange("a1").FormulaR1C1 = 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 Sub第三步:再点击“宏”→“查看宏”,选择“宏名”下的“PasswordBreaker”并点击“执行”,密码就现形了(图4)。
撤销工作表保护密码是多少
撤销工作表保护密码是多少工作表保护密码是指在Excel中对工作表进行保护,以防止未经授权的用户对工作表进行修改或删除。
当工作表被保护后,用户需要输入密码才能对工作表进行编辑或格式更改。
然而,有时候我们可能会忘记或需要撤销工作表保护密码,那么该怎么办呢?撤销工作表保护密码的方法有多种,下面将介绍几种常用的方法:方法一,使用已知密码进行撤销。
如果你之前设置了工作表保护密码,并且还记得这个密码,那么撤销工作表保护密码就非常简单了。
只需要按照以下步骤操作即可:1. 打开Excel文档,找到被保护的工作表。
2. 在工作表上方的菜单栏中点击“审阅”选项卡。
3. 在“审阅”选项卡中找到“保护工作表”按钮,并点击下拉箭头。
4. 在弹出的选项中选择“撤销工作表保护”,然后输入之前设置的密码。
5. 点击“确定”即可完成撤销工作表保护密码的操作。
方法二,使用VBA代码进行撤销。
如果你忘记了工作表保护密码,或者无法使用已知密码进行撤销,那么可以尝试使用VBA代码来进行撤销。
下面是具体的操作步骤:1. 打开Excel文档,按下“Alt + F11”组合键,打开VBA编辑器。
2. 在VBA编辑器中,依次展开“VBAProject”、“Microsoft Excel Objects”文件夹,找到需要撤销保护的工作表。
3. 在工作表的代码窗口中输入以下VBA代码:Sub UnprotectSheet()。
Dim ws As Worksheet。
Set ws = ThisWorkbook.Sheets("Sheet1") '将“Sheet1”替换为你需要撤销保护的工作表名称。
ws.Unprotect "password" '将“password”替换为你设置的密码。
End Sub。
4. 点击运行按钮执行代码,即可完成撤销工作表保护密码的操作。
方法三,使用第三方工具进行撤销。
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,点击执行,连点几个确定密码撤销完毕。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1、打开需要解除保护的EXCEL工作表;2、选择工具---宏---录制新宏---输入名字如:aa;3、停止录制(这样得到一个空宏);4、工具---宏---宏,选aa,点编辑按钮;5、删除窗口中的所有字符(只有几个),替换为下面的内容:(复制吧);6、关闭编辑窗口;7、工具---宏---宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.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 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 Boolean Application.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 66For 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 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==============================================================。