问大家夏朗Excel表格怎么去掉保护密码?第1个回答:no_song_song2017-09-07TA

第1个回答:

no_song_song2017-09-07TA获得超过255个赞Excel工作表保护密码**方法一个excel文档要修改其中的内容,可是被保护了,找了一堆**软件,要么需要购买,要么是**打开密码的,非保护密码。好不容易找到解决方案!excel保护密码**(绝对经典)如果你的Excel文件设置了保护密码而遗忘了,那麼请依照下面的步骤来操作,也许会有奇迹出现.不需要多麼高难度的操作和专业的软件支持.简单.方便.费驶般最多两分钟.(建议:操作前把原文件COPY一份)方法:1打开文件2工具---宏----录制新宏---输入名字如:aa3停止录制(这样得到一个空宏)4工具---宏----宏,选aa,点编辑按钮5删除窗口中的所有字符(只有几个),替换为下面的内容:PublicSubAllInternalPasswords()'Bre**sworksheetandworkbookstructurepasswords.BobMcCormick'probablyoriginatorofbasecodealgorithmmodifiedforcoverage'ofworkbookstructure/windowspasswordsandformultiplepasswords''NormanHarkerandJEMcGimpsey27-Dec-2002(Version1.1)'Modified2003-Apr-04byJEM:Allmsgstoconstants,and'eliminateoneExitSub(Version1.1.1)'RevealshashedpasswordsNOToriginalpasswordsConstDBLSPACEAsString=vbNewLine&vbNewLineConstAUTHORSAsString=DBLSPACE&vbNewLine&_"AdaptedfromBobMcCormickbasecodeby"&_"NormanHarkerandJEMcGimpsey"ConstHEADERAsString="AllInternalPasswordsUserMessage"ConstVERSIONAsString=DBLSPACE&"Version1.1.12003-Apr-04"ConstREPBACKAsString=DBLSPACE&"Pleasereportfailure"&_"tothemicrosoft.public.excel.programmingnewsgroup."ConstALLCLEARAsString=DBLSPACE&"Theworkbookshould"&_"nowbefreeofallpasswordprotection,som**esureyou:"&_DBLSPACE&"S**EITNOW!"&DBLSPACE&"andalso"&_DBLSPACE&"BACKUP!,BACKUP!!,BACKUP!!!"&_DBLSPACE&"Also,rememberthatthepasswordwas"&_"putthereforareason.Don'tstuffupcrucialformulas"&_"ordata."&DBLSPACE&"Accessan**seofsomedata"&_"maybeanoffense.Ifindoubt,don't."ConstMSGNOPWORDS1AsString="Therewerenopasswordson"&_"sheets,orworkbookstructureorwindows."&AUTHORS&VERSIONConstMSGNOPWORDS2AsString="Therewasnoprotectionto"&_"workbookstructureorwindows."&DBLSPACE&_"Proceedingtounprotectsheets."&AUTHORS&VERSIONConstMSGT**ETIMEAsString="AfterpressingOKbuttonthis"&_"willt**esometime."&DBLSPACE&"Amountoftime"&_"dependsonhowmanydifferentpasswords,the"&_"passwords,andyourcomputer'sspecification."&DBLSPACE&_"Justbepatient!M**emeacoffee!"&AUTHORS&VERSIONConstMSGPWORDFOUND1AsString="YouhadaWorksheet"&_"StructureorWindowsPasswordset."&DBLSPACE&_"Thepasswordfoundwas:"&DBLSPACE&"$$"&DBLSPACE&_"Noteitdownforpotentialfutureuseinotherworkbooksby"&_"thesamepersonwhosetthispassword."&DBLSPACE&_"Nowtocheckandclearotherpasswords."&AUTHORS&VERSIONConstMSGPWORDFOUND2AsString="YouhadaWorksheet"&_"passwordset."&DBLSPACE&"Thepasswordfoundwas:"&_DBLSPACE&"$$"&DBLSPACE&"Noteitdownforpotential"&_"futureuseinotherworkbooksbysamepersonwho"&_"setthispassword."&DBLSPACE&"Nowtocheckandclear"&_"otherpasswords."&AUTHORS&VERSIONConstMSGONLYONEAsString="Onlystructure/windows"&_"protectedwiththepasswordthatwasjustfound."&_ALLCLEAR&AUTHORS&VERSION&REPBACKDimw1AsWorksheet,w2AsWorksheetDimiAsInteger,jAsInteger,kAsInteger,lAsIntegerDimmAsInteger,nAsInteger,i1AsInteger,i2AsIntegerDimi3AsInteger,i4AsInteger,i5AsInteger,i6AsIntegerDimPWord1AsStringDimShTagAsBoolean,WinTagAsBooleanApplication.ScreenUpdating=FalseWithActiveWorkbookWinTag=.ProtectStructureOr.ProtectWindowsEndWithShTag=FalseForEachw1InWorksheetsShTag=ShTagOrw1.ProtectContentsNextw1IfNotShTagAndNotWinTagThenMsgBoxMSGNOPWORDS1,vbInformation,HEADERExitSubEndIfMsgBoxMSGT**ETIME,vbInformation,HEADERIfNotWinTagThenMsgBoxMSGNOPWORDS2,vbInformation,HEADERElseOnErrorResumeNextDo'**mmydoloopFori=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=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,HEADERExitDo'BypassallfornextsEndIfEndWithNext:Next:Next:Next:Next:NextNext:Next:Next:Next:Next:NextLoopUntilTrueOnErrorGoTo0EndIfIfWinTagAndNotShTagThenMsgBoxMSGONLYONE,vbInformation,HEADERExitSubEndIfOnErrorResumeNextForEachw1InWorksheets'AttemptclearancewithPWord1w1.UnprotectPWord1Nextw1OnErrorGoTo0ShTag=FalseForEachw1InWorksheets'ChecksforallclearShTagtriggeredto1ifnot.ShTag=ShTagOrw1.ProtectContentsNextw1IfShTagThenForEachw1InWorksheetsWithw1If.ProtectContentsThenOnErrorResumeNextDo'DummydoloopFori=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(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,HEADER'leveragefindingPwordbytryingonothersheetsForEachw2InWorksheetsw2.UnprotectPWord1Nextw2ExitDo'BypassallfornextsEndIfNext:Next:Next:Next:Next:NextNext:Next:Next:Next:Next:NextLoopUntilTrueOnErrorGoTo0EndIfEndWithNextw1EndIfMsgBoxALLCLEAR&AUTHORS&VERSION&REPBACK,vbInformation,HEADEREndSub6关闭编辑窗口7工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!