開心生活站

位置:首頁 > IT科技 > 

如何解除各版本excel工作表與工作薄保護密碼

IT科技2.63W

撤銷是不能撤銷的,只能通過破copy解密碼來實現,可以用修改後綴名稱的方法。工具:華碩電腦1、首先找到Excel表格,修改後綴名稱xlsx改爲演示操作表格rar,如下圖所示2、然後用壓縮文件打開,然後打開xl,如下圖所示3、然後把壓縮文件裏面找到的sheet1.xml文件,然後拖拽出來,然後要進行修改,如下圖所示4、然後sheet1.xml文件打開用記事本打開,然後搜索protection,把圖中的這zd一段代碼,全部刪除掉,如下圖所示。5、再把修改後的sheet1.xml文件,選擇拖拽到壓縮的工作蒲中,選擇替換掉就可以,如下圖所示。6、把文件名稱.rar重新更改.xlsx,然後再打開工作表保護就撤銷了,如下圖所示。本回答被網友採納,原發布者:飛蓮無解666如何破解EXCEL工作表保護密碼忘記密碼怎麼辦1.新建一個EXCEL工作表,而後點擊另存爲,講表格保存爲啓用宏的工作表2.一次點擊開發工具---錄製新宏,在彈出的對話框內修改宏名稱而後確定3.依次點擊開發工具----停止錄製宏,宏錄製完成4.依次點擊開發工具,---宏----在彈出的對話框找到我們剛纔錄製的宏名稱而後進入VBA界面5.在VBA界面,全選裏面的代碼,而後刪除,講裏面的代碼全部刪除完7a64e58685e5aeb9313334336237636.代碼複製到VBA編輯窗口內PublicSubAllInternalPasswords() 'Breaksworksheetandworkbookstructurepasswords.BobMcCormick 'probablyoriginatorofbasecodealgorithmmodifiedforcoverage 'ofworkbookstructure/windowspasswordsandformultiplepasswords ' 'NormanHarkerandJEMcGimpsey27-Dec-2002(Version1.1) 'Modified2003-Apr-04byJEM:Allmsgstoconstants,and 'eliminateoneExitSub(Version1.1.1) 'RevealshashedpasswordsNOToriginalpasswords ConstDBLSPACEAsString=vbNewLine&vbNewLine ConstAUTHORSAsString=DBLSPACE&vbNewLine&_ "AdaptedfromBobMcCormickbasecodeby"&_ "NormanHarkerandJEMcGimpsey" ConstHEADERAsString="AllInternalPasswordsUserMessage" ConstVERSIONAsString=DBLSPACE&"Version1.1.12003-Apr-04" ConstREPBACKAsString=DBLS,按下面步驟操作,如果不會發郵件給我吧 [email protected]\打開文件 2\工具e79fa5e98193e59b9ee7ad9431333262383635---宏----錄製新宏---輸入名字如: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 passwords Const DBLSPACE As String = vbNewLine & vbNewLine Const AUTHORS As String = DBLSPACE & vbNewLine & _ "Adapted from Bob McCormick base code by" & _ "Norman Harker and JE McGimpsey" Const HEADER As String = "AllInternalPasswords User Message" Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04" Const REPBACK As String = DBLSPACE & "Please report failure " & _ "to the microsoft.public.excel.programming newsgroup." Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _ "now be free of all password protection, so make sure you:" & _ DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _ DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _ DBLSPACE & "Also, remember that the password was " & _ "put there for a reason. Don't stuff up crucial formulas " & _ "or data." & DBLSPACE & "Access and use of some data " & _ "may be an offense. If in doubt, don't." Const MSGNOPWORDS1 As String = "There were no passwords on " & _ "sheets, or workbook structure or windows." & AUTHORS & VERSION Const MSGNOPWORDS2 As String = "There was no protection to " & _ "workbook structure or windows." & DBLSPACE & _ "Proceeding to unprotect sheets." & AUTHORS & VERSION Const MSGTAKETIME As String = "After pressing OK button this " & _ "will take some time." & DBLSPACE & "Amount of time " & _ "depends on how many different passwords, the " & _ "passwords, and your computer's specification." & DBLSPACE & _ "Just be patient! Make me a coffee!" & AUTHORS & VERSION Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _ "Structure or Windows Password set." & DBLSPACE & _ "The password found was: " & DBLSPACE & "$$" & DBLSPACE & _ "Note it down for potential future use in other workbooks by " & _ "the same person who set this password." & DBLSPACE & _ "Now to check and clear other passwords." & AUTHORS & VERSION Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _ "password set." & DBLSPACE & "The password found was: " & _ DBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _ "future use in other workbooks by same person who " & _ "set this password." & DBLSPACE & "Now to check and clear " & _ "other passwords." & AUTHORS & VERSION Const MSGONLYONE As String = "Only structure / windows " & _ "protected with the password that was just found." & _ ALLCLEAR & AUTHORS & VERSION & REPBACK Dim w1 As Worksheet, w2 As Worksheet Dim i As Integer, j As Integer, k As Integer, l As Integer Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer Dim PWord1 As String Dim ShTag As Boolean, WinTag As BooleanApplication.ScreenUpdating = False With ActiveWorkbook WinTag = .ProtectStructure Or .ProtectWindows End With ShTag = False For Each w1 In Worksheets ShTag = ShTag Or w1.ProtectContents Next w1 If Not ShTag And Not WinTag Then MsgBox MSGNOPWORDS1, vbInformation, HEADER Exit Sub End If MsgBox MSGTAKETIME, vbInformation, HEADER If Not WinTag Then MsgBox MSGNOPWORDS2, vbInformation, HEADER Else On Error Resume Next Do 'dummy do loop For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 With ActiveWorkbook .Unprotect Chr(i) & Chr(j) & Chr(k) & _ Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _ Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) If .ProtectStructure = False And _ .ProtectWindows = False Then PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _ Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) MsgBox Application.Substitute(MSGPWORDFOUND1, _ "$$", PWord1), vbInformation, HEADER Exit Do 'Bypass all for...nexts End If End With Next: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next Loop Until True On Error GoTo 0 End If If WinTag And Not ShTag Then MsgBox MSGONLYONE, vbInformation, HEADER Exit Sub End If On Error Resume Next For Each w1 In Worksheets 'Attempt clearance with PWord1 w1.Unprotect PWord1 Next w1 On Error GoTo 0 ShTag = False For Each w1 In Worksheets 'Checks for all clear ShTag triggered to 1 if not. ShTag = ShTag Or w1.ProtectContents Next w1 If ShTag Then For Each w1 In Worksheets With w1 If .ProtectContents Then On Error Resume Next Do 'Dummy do loop For i = 65 To 66: For j = 65 To 66: For k = 65 To 66 For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66 For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 .Unprotect Chr(i) & Chr(j) & Chr(k) & _ Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) If Not .ProtectContents Then PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _ Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _ Chr(i4) & Chr(i5) & Chr(i6) & Chr(n) MsgBox Application.Substitute(MSGPWORDFOUND2, _ "$$", PWord1), vbInformation, HEADER 'leverage finding Pword by trying on other sheets For Each w2 In Worksheets w2.Unprotect PWord1 Next w2 Exit Do 'Bypass all for...nexts End If Next: Next: Next: Next: Next: Next Next: Next: Next: Next: Next: Next Loop Until True On Error GoTo 0 End If End With Next w1 End If MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER End Sub6\關閉編輯窗口 7\工具---宏-----宏,選AllInternalPasswords,運行,確定兩次,等2分鐘,再確定.OK,沒有密碼了!!本回答被提問者採納www.51dongshi.com防採集。

大家在日常使用的過程中,經常會製作一些不允許別人修改的工作簿,這個時候就會使用保護密碼,但有時候如果忘記了保護密碼,要怎麼解除工作表與工作薄的保護密碼呢?一起來看看吧!

方法

打開需要破解密碼的Excel。

1、在進行編輯的excel地表的情況下中,那麼就出現提示了無法進行編輯excel。2、然後需要進

如何解除各版本excel工作表與工作薄保護密碼

按Alt+F11進入VBA編輯界面。

用宏代碼破解密碼:以office2007爲例說明,(2003也是一樣的,只是菜單命令的位置不同)

如何解除各版本excel工作表與工作薄保護密碼 第2張

選擇插入 ,點擊進入 模塊。

第一步、首先,打開Excel二次,打開被保護的Excel表格。在主界面界面上方選擇“審閱”,點擊打開

如何解除各版本excel工作表與工作薄保護密碼 第3張

在右邊Module的空白編輯區域,複製粘貼第五步中的所有內容,然後點擊運行該VBA命令。

第一步,先找到一個帶有有工作表保護密碼的Excel工作表,然後把後綴名稱改爲.rar。第二步,用

如何解除各版本excel工作表與工作薄保護密碼 第4張

Option Explicit

Excel,遺忘密碼後如何撤銷工作表保護密碼工作表保護密碼1、打開您需要撤銷保護密碼的Excel文件

Public SubAllInternalPasswords()

如何破解EXCEL工作表保護密碼忘記密碼怎麼辦1.新建一個EXCEL工作表,而後點擊另存爲,講表格保

' Breaks worksheet and workbook structure passwords. Bob McCormick

首先打開你要清楚密碼的工作表,點擊那個有密碼的工作簿,可以看到,現在這個工作簿有密碼,是無法修改的,

' probably originator of base code algorithm modified for coverage

一、密碼保護:Microsoft Excel中的密碼保護提供了幾種類型:利用密碼以打開一個文檔

' of workbook structure / windows passwords and for multiple passwords

1、在進行編輯的excel地表的情況下中,那麼就出現提示了無法進行編輯excel。2、然後需要進

'

' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)

用宏代碼破解密碼:以office2007爲例說明,(2003也是一樣的,只是菜單命令的位置不同)

' Modified 2003-Apr-04 by JEM: All msgs to constants, and

' eliminate one Exit Sub (Version 1.1.1)

' Reveals hashed passwords NOT original passwords

Const DBLSPACE As String = vbNewLine & vbNewLine

Const AUTHORS As String = DBLSPACE & vbNewLine & _

"Adapted from Bob McCormick base code by" & _

"Norman Harker and JE McGimpsey"

Const HEADER As String = "AllInternalPasswords User Message"

Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04"

Const REPBACK As String = DBLSPACE & "Please report failure "& _

"to the microsoft.public.excel.programming newsgroup."

Const ALLCLEAR As String = DBLSPACE & "The workbook should "& _

"now be free of all password protection, so make sure you:" & _

DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "andalso" & _

DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _

DBLSPACE & "Also, remember that the password was " & _

"put there for a reason. Don't stuff up crucial formulas " & _

"or data." & DBLSPACE & "Access and use of some data" & _

"may be an offense. If in doubt, don't."

Const MSGNOPWORDS1 As String = "There were no passwords on " & _

"sheets, or workbook structure or windows." & AUTHORS &VERSION

Const MSGNOPWORDS2 As String = "There was no protection to " & _

"workbook structure or windows." & DBLSPACE & _

"Proceeding to unprotect sheets." & AUTHORS & VERSION

Const MSGTAKETIME As String = "After pressing OK button this " &_

"will take some time." & DBLSPACE & "Amount of time" & _

"depends on how many different passwords, the " & _

"passwords, and your computer's specification." & DBLSPACE &_

"Just be patient! Make me a coffee!" & AUTHORS & VERSION

Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _

"Structure or Windows Password set." & DBLSPACE & _

"The password found was: " & DBLSPACE & "$$" &DBLSPACE & _

"Note it down for potential future use in other workbooks by " &_

"the same person who set this password." & DBLSPACE & _

"Now to check and clear other passwords." & AUTHORS & VERSION

Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _

"password set." & DBLSPACE & "The password found was:" & _

DBLSPACE & "$$" & DBLSPACE & "Note it down forpotential " & _

"future use in other workbooks by same person who " & _

"set this password." & DBLSPACE & "Now to check andclear " & _

"other passwords." & AUTHORS & VERSION

Const MSGONLYONE As String = "Only structure / windows " & _

"protected with the password that was just found." & _

ALLCLEAR & AUTHORS & VERSION & REPBACK

Dim w1 As Worksheet, w2 As Worksheet

Dim i As Integer, j As Integer, k As Integer, l As Integer

Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer

Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer

Dim PWord1 As String

Dim ShTag As Boolean, WinTag As Boolean

Application.ScreenUpdating =False

With ActiveWorkbook

WinTag = .ProtectStructure Or .ProtectWindows

End With

ShTag = False

For Each w1 InWorksheets

ShTag = ShTag Or w1.ProtectContents

Next w1

If Not ShTag And Not WinTag Then

MsgBox MSGNOPWORDS1, vbInformation, HEADER

Exit Sub

End If

MsgBox MSGTAKETIME, vbInformation, HEADER

If Not WinTag Then

MsgBox MSGNOPWORDS2, vbInformation, HEADER

Else

On Error Resume Next

Do 'dummy do loop

For i = 65 To 66: For j = 65 To 66: For k = 65 To 66

For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66

For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66

For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126

With ActiveWorkbook

.Unprotect Chr(i) & Chr(j) & Chr(k) & _

Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _

Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

If .ProtectStructure = False And _

.ProtectWindows = False Then

PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _

Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _

Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

MsgBox Application.Substitute(MSGPWORDFOUND1, _

"$$", PWord1), vbInformation, HEADER

Exit Do 'Bypass all for...nexts

End If

End With

Next: Next: Next: Next: Next: Next

Next: Next: Next: Next: Next: Next

Loop Until True

On Error GoTo 0

End If

If WinTag And Not ShTag Then

MsgBox MSGONLYONE, vbInformation, HEADER

Exit Sub

End If

On Error Resume Next

For Each w1 InWorksheets

'Attempt clearance with PWord1

w1.Unprotect PWord1

Next w1

On Error GoTo 0

ShTag = False

For Each w1 InWorksheets

'Checks for all clear ShTag triggered to 1 if not.

ShTag = ShTag Or w1.ProtectContents

Next w1

If ShTag Then

For Each w1 InWorksheets

With w1

If .ProtectContents Then

On Error Resume Next

Do 'Dummy do loop

For i = 65 To 66: For j = 65 To 66: For k = 65 To 66

For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66

For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66

For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126

.Unprotect Chr(i) & Chr(j) & Chr(k) & _

Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _

Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

If Not .ProtectContents Then

PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _

Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _

Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)

MsgBox Application.Substitute(MSGPWORDFOUND2, _

"$$", PWord1), vbInformation, HEADER

'leverage finding Pword by trying on other sheets

For Each w2 InWorksheets

w2.Unprotect PWord1

Next w2

Exit Do 'Bypass all for...nexts

End If

Next: Next: Next: Next: Next: Next

Next: Next: Next: Next: Next: Next

Loop Until True

On Error GoTo 0

End If

End With

Next w1

End If

MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation,HEADER

End Sub

第一步,先找到一個帶有有工作表保護密碼的Excel工作表,然後把後綴名稱改爲.rar。第二步,用壓縮文件zhidao打開,然後找壓縮的對應路徑。第三步,把從壓縮文件裏面找到的.xml文件,然後拖拽出來,進行修改。第四步,把保護代碼刪除來撤消工作專表保護,找到這個.xml文件用記事本打開,然後搜索【protection】,把從<sheetprotection.........="0"/>的代碼,全部刪除掉,如圖所示。第五步,然後再把剛剛修改後的屬.xml文件,選擇拖拽到壓縮的工作表中替換掉。第六步,再把文件名稱後綴改爲.xlsx,打開Excel表格,密碼保護就可以取消了。第七步,撤消保護工作表後,還可以在【審閱】選項下對工作表重新進行進行保護和撤消保護工作表操作,如圖所示,原發布者:教技韋德文Excel,遺忘密碼後如何撤銷工作表保護密碼工作表保護密碼1、打開您需要撤銷保護密碼的Excel文件;2、依次點擊菜單欄上的工具---宏----錄製新宏,輸入宏名字如:ab;3、停止錄製(這樣得到一個空宏);4、依次點擊菜單欄上的工具---宏----宏,選ab,點編輯按7a64e58685e5aeb931333433623761鈕;5、刪除窗口中的所有字符(只有幾個),替換爲以下內容;PublicSub工作表保護密碼()ConstDBLSPACEAsString=vbNewLine&vbNewLineConstAUTHORSAsString=DBLSPACE&vbNewLine&_"作者:eric"ConstHEADERAsString="工作表保護密碼"ConstVERSIONAsString=DBLSPACE&"版本Version1.1.1"ConstREPBACKAsString=DBLSPACE&""ConstZHENGLIAsString=DBLSPACE&"eric"ConstALLCLEARAsString=DBLSPACE&"該工作簿中的工作表密碼保護已全部解除。"&DBLSPACE&"請記得重新設置密碼"_&DBLSPACE&"注意:此方法僅用於遺忘密碼使用。"ConstMSGNOPWORDS1AsString="該文件工作表中沒有加密"ConstMSGNOPWORDS2AsString="該文件工作表中沒有加密2"ConstMSGTAKETIMEAsString="請耐心等候!"&DBLSPACE&"按確定開始回覆"ConstMSGPWORDFOUND1AsString="密碼重新組合爲:"&DBLSPACE&"$$"&DBLSPACE&_"如果該文件工作表有不同密碼,將搜索下一組密碼並修改清除"ConstMSGPWORDFOUND2AsString="密碼重新組合爲:"&DBLSPACE&"$$"&DBLSPACE&_"如果該文件,解除工作表密碼保護1、查知看代碼步驟:右鍵【sheet1】-【查看代碼】-打開代道碼窗口。2、插版入代碼代碼:Sub DeletePW()ActiveSheet.Protect DrawingObjects:=True, Contents:=True, AllowFiltering:=TrueActiveSheet.Protect DrawingObjects:=False, Contents:=True, AllowFiltering:=TrueActiveSheet.Protect DrawingObjects:=True, Contents:=True, AllowFiltering:=TrueActiveSheet.Protect DrawingObjects:=False, Contents:=True, AllowFiltering:=TrueActiveSheet.UnprotectEnd Sub步驟:粘貼代碼,點擊【權運行】即可。來自網頁鏈接,好簡單的方法:1.打開保護密碼的Excel文件2.複製工作表百內容3.新建工作表,在新工作表上點擊鼠標右鍵——“度選擇性粘貼” 注意是選擇性粘貼——回彈出對話框,在粘貼中選擇全部——確定。最後一步重要4.點擊鼠標右鍵——“選擇性粘貼” ——彈出對話框,在粘貼選項中選擇列寬——確定。完成上面就是新建可以編寫的工作表。希望能幫到你!不是保護工答作簿吧?保護工作簿這方法就無用了本回答被提問者採納,原發布者:教技韋德文Excel,遺忘密碼後如何撤銷工作表保護密碼工作表保護密碼1、打開您需要撤銷保護密碼的Excel文件;2、依次點擊菜單7a64e78988e69d8331333433623761欄上的工具---宏----錄製新宏,輸入宏名字如:ab;3、停止錄製(這樣得到一個空宏);4、依次點擊菜單欄上的工具---宏----宏,選ab,點編輯按鈕;5、刪除窗口中的所有字符(只有幾個),替換爲以下內容;PublicSub工作表保護密碼()ConstDBLSPACEAsString=vbNewLine&vbNewLineConstAUTHORSAsString=DBLSPACE&vbNewLine&_"作者:eric"ConstHEADERAsString="工作表保護密碼"ConstVERSIONAsString=DBLSPACE&"版本Version1.1.1"ConstREPBACKAsString=DBLSPACE&""ConstZHENGLIAsString=DBLSPACE&"eric"ConstALLCLEARAsString=DBLSPACE&"該工作簿中的工作表密碼保護已全部解除。"&DBLSPACE&"請記得重新設置密碼"_&DBLSPACE&"注意:此方法僅用於遺忘密碼使用。"ConstMSGNOPWORDS1AsString="該文件工作表中沒有加密"ConstMSGNOPWORDS2AsString="該文件工作表中沒有加密2"ConstMSGTAKETIMEAsString="請耐心等候!"&DBLSPACE&"按確定開始回覆"ConstMSGPWORDFOUND1AsString="密碼重新組合爲:"&DBLSPACE&"$$"&DBLSPACE&_"如果該文件工作表有不同密碼,將搜索下一組密碼並修改清除"ConstMSGPWORDFOUND2AsString="密碼重新組合爲:"&DBLSPACE&"$$"&DBLSPACE&_"如果該文件,那不是說你工作薄保護問題,是說你的代碼有錯,破解工作表保護密碼去除Excel工作表保護密碼,很有用的7a64e4b893e5b19e31333337393632方法操作步驟:1. 打開需要破解密碼的Excel;2. 按Alt+F11進入VBA編輯界面;3. 插入 -- 模塊(Module);4. 在右邊Module的空白編輯區域,複製粘貼下面所有內容5. F5,運行該VBA命令;---------------------(下面的內容在第四步複製進去)-------------------------Option ExplicitPublic SubAllInternalPasswords()' 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 & "andalso" & _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 & VERSIONConst MSGPWORDFOUND2 As String = "You had a Worksheet " & _"password set." & DBLSPACE & "The password found was:" & _DBLSPACE & "$$" & DBLSPACE & "Note it down forpotential " & _"future use in other workbooks by same person who " & _"set this password." & DBLSPACE & "Now to check andclear " & _"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 InWorksheetsShTag = 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 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.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 InWorksheets'Attempt clearance with PWord1w1.Unprotect PWord1Next w1On Error GoTo 0ShTag = FalseFor Each w1 InWorksheets'Checks for all clear ShTag triggered to 1 if not.ShTag = ShTag Or w1.ProtectContentsNext w1If ShTag ThenFor Each w1 InWorksheetsWith 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 InWorksheetsw2.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本回答被提問者和網友採納,表格發給我.幫你取消密碼[email protected],忘記密碼了就沒辦法了內容來自www.51dongshi.com請勿採集。

標籤:excel 表與