《excel表格加密文档的解密教程.docx》由会员分享,可在线阅读,更多相关《excel表格加密文档的解密教程.docx(12页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、excel表格加密文档的解密教程excel表格加密文档的解密教程Excel中的加密文档有时候需要进行解密处理,但是很多人不知道怎么操作,不要着急,我告诉你excel表格加密文档的解密教程,希望浏览过后对你有所启发!excel表格加密文档解密教程加密文档解密步骤1:打开您需要破解的Excel文件,如下图:加密文档解密步骤2:依次点击菜单栏上的工具-宏-录制新宏;加密文档解密步骤3:输入宏名字(PS:打击积极性啊!)如:易尔拓,然后停止录制(这样得到一个空宏,为后面添加vb代码做准备);加密文档解密步骤4:依次点击菜单栏上的工具-宏-宏,选易尔拓,点编辑按钮;删除窗口中的所有字符,替换为下面的内容
2、;OptionExplicitPublicSubAllInternalPasswords()Breaksworksheetandworkbookstructurepasswords.BobMcCormickprobablyoriginatorofbasecodealgorithmmodifiedforcoverageofworkbookstructure/windowspasswordsandformultiplepasswordsNormanHarkerandJEMcGimpsey27-Dec-2002(Version1.1)Modified2003-Apr-04byJEM:Allmsgst
3、oconstants,andeliminateoneExitSub(Version1.1.1)RevealshashedpasswordsNOToriginalpasswordsConstDBLSPACEAsString=vbNewLinevbNewLineConstAUTHORSAsString=DBLSPACEvbNewLine_AdaptedfromBobMcCormickbasecodeby_NormanHarkerandJEMcGimpseyConstHEADERAsString=AllInternalPasswordsUserMessageConstVERSIONAsString=
4、DBLSPACEVersion1.1.12003-Apr-04ConstREPBACKAsString=DBLSPACEPleasereportfailure_tothemicrosoft.public.excel.programmingnewsgroup.ConstALLCLEARAsString=DBLSPACETheworkbookshould_nowbefreeofallpasswordprotection,somakesureyou:_DBLSPACESAVEITNOW!DBLSPACEandalso_DBLSPACEBACKUP!,BACKUP!,BACKUP!_DBLSPACEA
5、lso,rememberthatthepasswordwas_putthereforareason.Dontstuffupcrucialformulas_ordata.DBLSPACEAccessanduseofsomedata_maybeanoffense.Ifindoubt,dont.ConstMSGNOPWORDS1AsString=Therewerenopasswordson_sheets,orworkbookstructureorwindows.AUTHORSVERSIONConstMSGNOPWORDS2AsString=Therewasnoprotectionto_workboo
6、kstructureorwindows.DBLSPACE_Proceedingtounprotectsheets.AUTHORSVERSIONConstMSGTAKETIMEAsString=AfterpressingOKbuttonthis_willtakesometime.DBLSPACEAmountoftime_dependsonhowmanydifferentpasswords,the_passwords,andyourcomputersspecification.DBLSPACE_Justbepatient!Makemeacoffee!AUTHORSVERSIONConstMSGPW
7、ORDFOUND1AsString=YouhadaWorksheet_StructureorWindowsPasswordset.DBLSPACE_Thepasswordfoundwas:DBLSPACE$DBLSPACE_Noteitdownforpotentialfutureuseinotherworkbooksby_thesamepersonwhosetthispassword.DBLSPACE_Nowtocheckandclearotherpasswords.AUTHORSVERSIONConstMSGPWORDFOUND2AsString=YouhadaWorksheet_passw
8、ordset.DBLSPACEThepasswordfoundwas:_DBLSPACE$DBLSPACENoteitdownforpotential_futureuseinotherworkbooksbysamepersonwho_setthispassword.DBLSPACENowtocheckandclear_otherpasswords.AUTHORSVERSIONConstMSGONLYONEAsString=Onlystructure/windows_protectedwiththepasswordthatwasjustfound._ALLCLEARAUTHORSVERSIONR
9、EPBACKDimw1AsWorksheet,w2AsWorksheetDimiAsInteger,jAsInteger,kAsInteger,lAsIntegerDimmAsInteger,nAsInteger,i1AsInteger,i2AsIntegerDimi3AsInteger,i4AsInteger,i5AsInteger,i6AsIntegerDimPWord1AsStringDimShTagAsBoolean,WinTagAsBooleanApplication.ScreenUpdating=FalseWithActiveWorkbookWinTag=.ProtectStruc
10、tureOr.ProtectWindowsEndWithShTag=FalseForEachw1InWorksheetsShTag=ShTagOrw1.ProtectContentsNextw1IfNotShTagAndNotWinTagThenMsgBoxMSGNOPWORDS1,vbInformation,HEADERExitSubEndIfMsgBoxMSGTAKETIME,vbInformation,HEADERIfNotWinTagThenMsgBoxMSGNOPWORDS2,vbInformation,HEADERElseOnErrorResumeNextDodummydoloop
11、Fori=65To66:Forj=65To66:Fork=65To66Forl=65To66:Form=65To66:Fori1=65To66Fori2=65To66:Fori3=65To66:Fori4=65To66Fori5=65To66:Fori6=65To66:Forn=32To126WithActiveWorkbook.UnprotectChr(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=FalseAnd_.ProtectWindows=
12、FalseThenPWord1=Chr(i)Chr(j)Chr(k)Chr(l)_Chr(m)Chr(i1)Chr(i2)Chr(i3)_Chr(i4)Chr(i5)Chr(i6)Chr(n)MsgBoxApplication.Substitute(MSGPWORDFOUND1,_$,PWord1),vbInformation,HEADERExitDoBypassallfor.nextsEndIfEndWithNext:Next:Next:Next:Next:NextNext:Next:Next:Next:Next:NextLoopUntilTrueOnErrorGoTo0EndIfIfWin
13、TagAndNotShTagThenMsgBoxMSGONLYONE,vbInformation,HEADERExitSubEndIfOnErrorResumeNextForEachw1InWorksheetsAttemptclearancewithPWord1w1.UnprotectPWord1Nextw1OnErrorGoTo0ShTag=FalseForEachw1InWorksheetsChecksforallclearShTagtriggeredto1ifnot.ShTag=ShTagOrw1.ProtectContentsNextw1IfShTagThenForEachw1InWo
14、rksheetsWithw1If.ProtectContentsThenOnErrorResumeNextDoDummydoloopFori=65To66:Forj=65To66:Fork=65To66Forl=65To66:Form=65To66:Fori1=65To66Fori2=65To66:Fori3=65To66:Fori4=65To66Fori5=65To66:Fori6=65To66:Forn=32To126.UnprotectChr(i)Chr(j)Chr(k)_Chr(l)Chr(m)Chr(i1)Chr(i2)Chr(i3)_Chr(i4)Chr(i5)Chr(i6)Chr
15、(n)IfNot.ProtectContentsThenPWord1=Chr(i)Chr(j)Chr(k)Chr(l)_Chr(m)Chr(i1)Chr(i2)Chr(i3)_Chr(i4)Chr(i5)Chr(i6)Chr(n)MsgBoxApplication.Substitute(MSGPWORDFOUND2,_$,PWord1),vbInformation,HEADERleveragefindingPwordbytryingonothersheetsForEachw2InWorksheetsw2.UnprotectPWord1Nextw2ExitDoBypassallfor.nextsEndIfNext:Next:Next:Next:Next:NextNext:Next:Next:Next:Next:NextLoopUntilTrueOnErrorGoTo0EndIfEndWithNextw1EndIfMsgBoxALLCLEARAUTHORSVERSIONREPBACK,vbInformation,HEADEREndSub加密文档解密步骤5:依次点击菜单栏上的工具-宏-宏,选AllInternalPasswords,执行,确定两次;耐心等一会,再点击两次确定,就ok啦!
限制150内