Excel加密保护解锁.docx
文本预览下载声明
Excel加密保护解锁 拿到一份Excel文件,由于有些内容加了保护,修改不了,于是到网上搜索了一下解密方法,找到一种试了一下有效,有大家吧! 1\打开文件 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-XX (Version 1.1) Modified XX-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 amp; vbNewLine Const AUTHORS As String = DBLSPACE amp; vbNewLine amp; _ quot;Adapted from Bob McCormick base code byquot; amp; _ quot;Norman Harker and JE McGimpseyquot; Const HEADER As String = quot;AllInternalPasswords User Messagequot; Const VERSION As String = DBLSPACE amp; quot;Version 1.1.1 XX-Apr-04quot; Const REPBACK As String = DBLSPACE amp; quotlease report failure quot; amp; _ quot;to the gramming newsgroup.quot; Const ALLCLEAR As String = DBLSPACE amp; quot;The workbook should quot; amp; _ quot;now be free of all password protection, so make sure you:quot; amp; _ DBLSPACE amp; quot;SAVE IT NOW!quot; amp; DBLSPACE amp; quot;and alsoquot; amp; _ DBLSPACE amp; quot;BACKUP!, BACKUP!!, BACKUP!!!quot; amp; _ DBLSPACE amp; quot;Also, remember that the password was quot; amp; _ quot;put there for a reason. Dont stuff up crucial formulas quot; amp; _ quot;or data.quot; amp; DBLSPACE amp; quot;Access and use of some data quot; amp; _ quot;may be an offense. If in doubt, dont.quot; Const MSGNOPWORDS1 As String = quot;There were no passwords on quot; amp; _ quot;sheets, or workbook structure or windows.quot; amp; AUTHORS amp; VERSION Const MSGNOPWORDS2 As String = quot;There was no protection to quot; amp; _ quot;workbook structure or wi
显示全部