搜档网
当前位置:搜档网 › excel文件忘记密码后的解密方法

excel文件忘记密码后的解密方法

excel文件忘记密码后的解密方法
excel文件忘记密码后的解密方法

excel文件忘记密码后的解密方法

excel文件密码的设置有2种,一种是写保护,另外一种是打开保护。对应不同的保护措施,应该用不同的解密方法。

一:这是写保护的破解:

方法:

1\打开文件

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 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 ShT ag As Boolean, WinT ag As Boolean Application.ScreenUpdating = False With ActiveWorkbook

WinT ag = .ProtectStructure Or .ProtectWindows

End With

ShT ag = False

For Each w1 In Worksheets

ShT ag = ShT ag 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

ShT ag = False

For Each w1 In Worksheets

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

ShT ag = ShT ag Or w1.ProtectContents

Next w1

If ShT ag Then

For Each w1 In Worksheets

With w1

If .ProtectContents Then

On Error Resume Next

Do 'Dummy do loop

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

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

For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126 .Unprotect Chr(i) & Chr(j) & Chr(k) & _

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

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

If Not .ProtectContents Then

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

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

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

MsgBox Application.Substitute(MSGPWORDFOUND2, _ "$$", PWord1), vbInformation, HEADER

'leverage finding Pword by trying on other sheets

For Each w2 In Worksheets

w2.Unprotect PWord1

Next w2

Exit Do 'Bypass all for...nexts

End If

Next: Next: Next: Next: Next: Next

Next: Next: Next: Next: Next: Next

Loop Until True

On Error GoTo 0

End If

End With

Next w1

End If

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

6. 然后执行便可获得密码

附件:

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 T o 66

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

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

For i5 = 65 To 66: For i6 = 65 T o 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

今天解决的大问题!!

解释一下:

当Excel工作表采用密码保护时,就会生成一个16位(双字节) 长hash值。当输入密码进行验证时,真正进行比较的就是这个hash值。事实上,有很多不同的密码都可以生成同样的hash值。

大家可以试试:

当你用“test”(不含双引号)作为Excel工作表保护密码,你同样可以用“zzyw”(同样不含双引号)这个密码进行解锁。怎么样,神奇吧?

Excel工作簿保护时将密码hash化然后存储起来,解密时也是将输入的密码hash 求值然后与储存的hash值比较,用不同的字串hash求值后可以生成同样的hash结果,根据这个原理,我们用一个12位的字串进行hash求值,尝试破解excel的工作簿保护密码。其实这个破解的方法很简单,就是利用穷举法,不断的用不同的字串组合去尝试比较,用11位A、B字母的组合加1位其他字母可以生成任意的hash字串。

二:这是打开保护的破解

下载一个工具软件Office Password Recovery Toolbox

步骤/方法

1

先暂定系统中的杀毒软件,等将Excel密码破解完毕后再重新开启杀毒。(破解类的工具杀毒软件都会误认为是木马或病毒,这个没毒,请放心使用。)

2

双击运行该软件;

3

单击“文件”按钮,在弹出的菜单中选择“打开文件…”,然后找到你需要破解的Excel表格的存放位置,打开;

4

此时,Excel文件就已经导入了此软件,大家还可以看到可以破解“打开”、写入、工作簿密码、共享工作簿密码、VBA工程密码等,全部可以移除。点击界面上的“移除密码”;

5

点击“移除密码”以后会提示程序必须要链接网络才可以运行,(确定你的计算机是否已经链接好了网络,然后单击“确定”按钮);

6

这时后会提示“状态:正在链接到Rixler Server ”,只需等待几秒钟破解完

成即可。

7

OK,密码被成功移除,该文档已经被成功解密,如下图:

8

8.哦,生成了一个新的没有密码了的文档:西西软件_NESOY.xls

里边内容部方便公开,我随便打开了一个测试时打开的截图。图中的https://www.sodocs.net/doc/d313777252.html,什么的字样就是我破解后看到的内容。

9

类似的破解软件现在已经很多了,有兴趣的可以自己去找找自己喜欢用了,总之自己习惯用的才是最好用的。

注意事项

此方法只是为了给忘记自己文档的同仁提供方便,请不要用于偷窥别人隐私等不道德的用途。

强力破解EXCEL工作表保护密码

强力破解EXCEL工作表保护 在日常工作中,您是否遇到过这样的情况:您用Excel编制的报表、表格、程序等,在单元格中设置了公式、函数等,为了防止其他人修改您的设置或者防止您自己无意中修改,您可能会使用Excel的工作表保护功能,但时间久了保护密码容易忘记,这该怎么办?有时您从网上下载的Excel格式的小程序,您想修改,但是作者加了工作表保护密码,怎么办?您只要按照以下步骤操作,Excel工作表保护密码瞬间即破! 1、打开您需要破解保护密码的Excel文件; 2、依次点击菜单栏上的工具---宏----录制新宏,输入宏名字 如:aa; 3、停止录制(这样得到一个空宏); 4、依次点击菜单栏上的工具---宏----宏,选aa,点编辑按钮; 5、删除窗口中的所有字符(只有几个),替换为下面的内容; Option Explicit Public Sub AllInternalPasswords() ' Breaks worksheet and workbook structure passwords. Bob McCormick ' probably originator of base code algorithm modified for coverage ' of workbook structure / windows passwords and for multiple passwords ' ' 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 " &

隐藏工作表并设置密码

Excel中彻底隐藏工作表的正确方法 在实际工作中,可能因需要建立多个excel工作表,当工作完成后,为了安全起见又需要将其中部分工作表隐藏起来,不让其显示。 那么,在Excel中如何有效的隐藏指定工作表呢? 单击“窗口”菜单-“隐藏”之后,系统会将所有的工作表隐藏起来,当“取消隐藏”后又会将所有的工作表全部显示出来。 如果只需要隐藏指定的工作表,那么上面的方法就不能实现了。 下面就是隐藏部分工作表的详细操作步骤: 第一步,选定需要隐藏的工作表。 如果是多个相邻工作表:可以先选中第一张工作表的标签,再按住Shift 单击最后一张工作表的标签。 如果是多个不相邻的工作表:可以单击第一张工作表的标签,再按住Ctrl 单击其他工作表的标签。 第二步,单击“格式”菜单——“工作表”——“隐藏”命令。 如果是需要恢复隐藏的工作表,只需反其道而行,单击“格式”——“工作表”,再单击“取消隐藏”,在“取消隐藏工作表”列表框中,双击需要显示的被隐藏工作表的名称,即可取消隐藏工作表。 注意:取消隐藏命令,不能取消隐藏通过VBA编写的隐藏命令。 以上就是隐藏工作表的操作步骤。使用隐藏工作表只是对文档的一种常规保护方法。它的一个致命弱点就是别人点击“格式”|“工作表”|“取消隐藏”,就会重现被隐藏的工作表。对VBA稍加熟悉一点,就可以利用VBA来进一步保护要隐藏的工作表。 当重要的Excel工作表编辑完毕,保存,单击菜单栏中的“工具”|“宏”|“Visual Basic 编辑器”,弹出“Microsoft Visual Basic 编辑器”窗口,在左侧窗格上部首先选中需要保护的工作表,然后在左侧窗格下部“属性”面板中找到“Visible”,将其值设置为“2-xlSheetVeryHidden”,进行如上设置后保存,在Excel窗口中,再也看不到隐藏的工作表了,这下别人就无法通过取消隐藏的方法来查看我们隐藏起来的工作表,相对就安全一些。 如果还放心,还可以给隐藏的工作表设置一个口令,以策安全。还是打开“Microsoft Visual Basic 编辑器”窗口,在左侧窗格上部单击刚才被隐藏起来的工作表,然后单击菜单栏的“工具”|“VBAProject属性”,在弹出来的属性窗口中切换到“保护”选项卡,然后勾选“查看时锁定工程”,并在“密码”和“确认密码”文本框中输入自己欲使用的密码,单击“确定”。 通过以上操作,不但将重要的excel工作表隐藏起来,而且还加上了口令保护,这下就安全了。当我们需要使用隐藏的工作表时,只需反其道而行之,进入“Microsoft Visual Basic 编辑器”窗口,双击左侧窗格上部的“VBAProject(工作薄名)”,在弹出来的口令验证对话框中正确输入前面设置的密码,然后将隐藏起来的工作表“Visible”属性值设置为“-1-xlSheetVisible”,退出“Microsoft Visual Basic 编辑器”窗口即可正常使用工作表。

EXCEL密码保护破解2010

EXCEL密码保护破解方法: 1\打开文件 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 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

Excel中单个工作表加密操作方法

Excel中单个工作表加密操作方法 Excel表格是我们工作中经常用到的,而它往往涉及统计数据等敏感问题,因此,Excel表格的保护也是经常遇到的问题,如何安全使用Excel呢?我们常用到的是Excel“工具”菜单提供的“保护工作表”和“保护工作簿”功能。 用宏进行“显式”加密 在需要加密的Excel 表中,点击[工具]→[宏]→[Visual Basic 编辑器],打开“工程资源管理器”,双击该工作表,在右边的是设置该表属性的编辑窗口,单击该窗口左上方的下拉列表框,选择Worksheet,再从该窗口右上方的列表框中选择Activate(激活)(如图)。 添加如下代码:(假设“123”为密码,Sheet1为限制权限表格,Sheet2为工作簿中为任何适合的工作表) Private Sub Worksheet_Activate() Sheets("sheet1").Cells.Font.ColorIndex = 2 '设置文字颜色为白色

If Application.InputBox("请输入密码:") = 123 Then Range("A1").Select ActiveSheet.Cells.Font.ColorIndex = 56 ' 设置文字颜色为黑色 Else MsgBox "密码错误,即将退出!" Sheets("sheet2").Select End If End Sub 每次当你选择该“加密”表的时候都会弹出对话框要求输入密码,正确则进入该表(Sheet1),否则会选择其他表(Sheet2)。

用宏进行“隐式”加密 “显式”加密,虽然可以让没有密码的使用者无法看到“加密”表格,但是每次选择该表格时都会弹出对话框,实在不方便而且给其他用户一种被防范的不舒服感觉。于是笔者就想出了下面的“隐式”加密方法。假如要加密的是Sheet1,我们可以设置在Sheet2的“A1”单元格为密码的输入处。于是修改以上代码如下: Private Sub Worksheet_Activate() Sheets("sheet1").Cells.Font.ColorIndex = 2'设置文字颜色为白色 If Sheets("sheet2").Cells(1, 1) = 123 Then Range("A1").Select ActiveSheet.Cells.Font.ColorIndex = 56 ' 设置文字颜色为黑色

如何破解EXCEL工作表保护密码忘记密码怎么办

如何破解EXCEL工作表保护密码忘记密码怎么办 1.新建一个EXCEL工作表,而后点击另存为,讲表格保存为启用宏的工作表 * ■乐 碍乐雄迥 -* >计■尙 二0Q) .... ㈱ 亍总HI “ ■ I i ■ * \ Jfcft禺呵第證Mkrp^pft Qffiy fxeel JDQ7 工作褰x I gm [EHMI呦 怔■: Ad>51iAk±VAt4f t?nfl; 2. 一次点击开发工具---录制新宏,在弹出的对话框内修改宏名称而后确定 ft 真面布局公式敖掠审同视冒开裁工員 D F 254 3.依次点击开发工具停止录制宏,宏录制完成

| J fFik^j| 匮独 画Mffi植近三t 陥比疙上窸甜 空釦模式劑执行龙话框 代再 4.依次点击开发工具,---宏----在弹出的对话框找到我们刚才录制的宏名称而后进入 VBA界面 处8屯简开林工貝 能t ■BS| 斫厨丁亓的二作輝 说閉 5.在VBA界面,全选里面的代码,而后删除,讲里面的代码全部删除完

Mkroioft visual - Microsoft Office Excel 200?工荷txlsx 文件⑥锚也迺世)磁?惜式型谒试曲迳行逊Zft? 尹碗詠笛莆口呦 [

Office 2007 Excel工作表保护密码忘记之解决办法

Office 2007 Excel工作表保护密码忘记之解决办法 从网上搜集资料,以下是自己操作实践! 1、打开受保护的Excel工作表(此步骤打开其他Excel文件也行,因为这里是要启用宏): 在打开的Excel文件菜单栏空白处,右键单击鼠标,选择“自定义快速访问工具栏···”,打开Excel选项窗口,如上图所示。 2、在打开的Excel选项窗口中,选择“常用”一栏,再在右边框中勾中“在功能区显示”开 发工具”选项卡”,如图所示: 3、点击“确定”按钮后,返回Excel工作表,这时可以在Excel工作表菜单栏中出现“开发 工具”菜单项,选择“开发工具”菜单项中的“宏安全性”,如图所示:

4、打开“信任中心”窗口,选择左边栏中的“宏设置”一项,再在右边栏目中,选中“启 用所有宏···”及勾中“信任对VBA工程对象模型的访问”一项,点击“确定”按钮: 5、返回到Excel工作表,在“开发工具”菜单下,选择“录制宏”一项,如图: 6、在打开的“录制新宏”窗口中,在“宏名”一栏的文本框中输入名字(可以任取,这里 以test为例),在“保存在”一栏的下拉列表框中,选择“当前工作簿”(其实也是可以不用选择的,但为了慎重起见还是选择),最后点击“确定”按钮:

7、再返回到Excel工作表,此时,“开发工具“菜单项下原先的“录制宏”变为了“停止录 制”,现在就点击“停止录制”,结束宏的录制,这样就可以创建一个空宏test。如图: 8、停止录制宏之后,再选择“宏”选项: 9、在打开的“宏”窗口中,就会出现刚才创建的test宏,“位置”一栏选择“当前工作簿” (为了与前面相对应),然后在“宏名”下选择刚才创建的test宏,再点击右边栏目中的“编辑“选项,如:

破解EXCEL工作表保护密码的简单方法

破解EXCEL工作表保护密码的简单方法 你是否给excel文件设置了保护工作表密码,现在要撤消工作表保护,但密码却忘了,自己把锁在了门外,真尴尬呀!怎么办?下面的方法将轻松解决: 本人亲测,完全可以成功,但是本方法只用于解决自己的文件忘记密码,请勿进行违法行为,一切后果本人不负责任 1.打开你的受保护的文件 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 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

Excel中单个工作表加密

Excel表格是我们工作中经常用到的,而它往往涉及统计数据等敏感问题,因此,Excel表格的保护也是经常遇到的问题,如何安全使用Excel呢?我们常用到的是Excel“工具”菜单提供的“保护工作表”和“保护工作簿”功能。有没有其他方法呢? 用宏进行“显式”加密 在需要加密的Excel 表中,点击[工具]→[宏]→[Visual Basic编辑器],打开“工程资源管理器”,双击该工作表,在右边的是设置该表属性的编辑窗口,单击该窗口左上方的下拉列表框,选择Worksheet,再从该窗口右上方的列表框中选择Activate(激活)(如图)。 察看原图发送到手机 添加如下代码:(假设“123”为密码,Sheet1为限制权限表格,Sheet2为工作簿中为任何适合的工作表) Private Sub Worksheet_Activate() Sheets("sheet1").Cells.Font.ColorIndex = 2 '设置文字颜色为白色 If Application.InputBox("请输入密码:") = 123 Then Range("A1").Select ActiveSheet.Cells.Font.ColorIndex = 56 ' 设置文字颜色为黑色 Else MsgBox "密码错误,即将退出!" Sheets("sheet2").Select End If End Sub 每次当你选择该“加密”表的时候都会弹出对话框要求输入密码,正确则进入该表(Sheet1),否则会选择其他表(Sheet2)。

用宏进行“隐式”加密 “显式”加密,虽然可以让没有密码的使用者无法看到“加密”表格,但是每次选择该表格时都会弹出对话框,实在不方便而且给其他用户一种被防范的不舒服感觉。于是笔者就想出了下面的“隐式”加密方法。假如要加密的是Sheet1,我们可以设置在Sheet2的“A1”单元格为密码的输入处。于是修改以上代码如下: Private Sub Worksheet_Activate() Sheets("sheet1").Cells.Font.ColorIndex = 2'设置文字颜色为白色 If Sheets("sheet2").Cells(1, 1) = 123 Then Range("A1").Select ActiveSheet.Cells.Font.ColorIndex = 56 ' 设置文字颜色为黑色 End If End Sub 设置好以后,只有Sheet2的(A1)单元格为密码“123”时“加密”表Sheet1的内容才显示出来,否则就是透明的,神不知鬼不觉;所谓“隐式”。 “隐式”加密虽然保证了没有密码的用户不能查看“加密”表格的内容,但是不能保护其他用户对其进行修改。所以我们要综合运用上面所说的“保护表格”和“隐式加密”对要保密的表格进行设置。

30秒破解EXCEL密码

30秒破解EXCEL密码 1\打开文件 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 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 & _

Excel中如何破解“撤销工作表保护密码

Excel中如何破解“撤销工作表保护密码”并获取原始密码 1. 打开需要破解密码的Excel; 2. 按Alt+F11进入VBA编辑界面; 3. 插入-- 模块(Module); 4. 在右边Module的空白编辑区域,复制粘贴下面所有内容 5. F5,运行该VBA命令; Public Sub AllInternalPasswords() ' Breaks worksheet and workbook structure passwords. Bob McCormick ' probably originator of base code algorithm modified for coverage ' of workbook structure / windows passwords and for multiple passwords ' ' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1) ' Modified 2003-Apr-04 by JEM: All msgs to constants, and ' eliminate one Exit Sub (Version 1.1.1) ' Reveals hashed passwords NOT original passwords Const DBLSPACE As String = vbNewLine & vbNewLine Const AUTHORS As String = DBLSPACE & vbNewLine & _ "Adapted from Bob McCormick base code by" & _ "Norman Harker and JE McGimpsey" Const HEADER As String = "AllInternalPasswords User Message" Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04" Const REPBACK As String = DBLSPACE & "Please report failure " & _ "to the microsoft.public.excel.programming newsgroup." Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _ "now be free of all password protection, so make sure you:" & _ DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _ DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _ DBLSPACE & "Also, remember that the password was " & _ "put there for a reason. Don't stuff up crucial formulas " & _ "or data." & DBLSPACE & "Access and use of some data " & _ "may be an offense. If in doubt, don't." Const MSGNOPWORDS1 As String = "There were no passwords on " & _ "sheets, or workbook structure or windows." & AUTHORS & VERSION Const MSGNOPWORDS2 As String = "There was no protection to " & _ "workbook structure or windows." & DBLSPACE & _ "Proceeding to unprotect sheets." & AUTHORS & VERSION Const MSGTAKETIME As String = "After pressing OK button this " & _ "will take some time." & DBLSPACE & "Amount of time " & _ "depends on how many different passwords, the " & _ "passwords, and your computer's specification." & DBLSPACE & _ "Just be patient! Make me a coffee!" & AUTHORS & VERSION Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _ "Structure or Windows Password set." & DBLSPACE & _ "The password found was: " & DBLSPACE & "$$" & DBLSPACE & _

破解excel工作保护表密码的方式

在Excel这一单元的教学中,我们经常使用Excel的工作表保护功能,将工作表用密码保护起来,以防学生操作时进行修改,但是这样一来有可能会无法进行一些操作(如输入公式等),时间久了保护的密码也有可能忘记了,这该怎么办呢?只要按照以下步骤操作,Excel工作表保护密码瞬间即破! 1、打开您需要破解保护密码的Excel文件。 2、执行“工具→宏→录制新宏”命令,输入宏的名字(如:aa)。 3、停止录制(这样得到一个空宏)。 4、执行“工具→宏→宏”命令,选aa,点击“编辑”按钮。 5、删除窗口中的所有字符,替换为下面的内容(蓝色部分): Option Explicit Public Sub AllInternalPasswords() ' Breaks worksheet and workbook structure passwords. Bob McCormick ' probably originator of base code algorithm modified for coverage ' of workbook structure / windows passwords and for multiple passwords ' ' 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 & _

相关主题