得力33025**机excel文件密码是多少
星空映像 & 张轩
2024-12-02 06:56:57
最佳回答
打卡机的excel文件都是有密码的,需要管理员密码才能更改,另外一般考勤机(差的那种)使用的是access数据库。这个access数据库应该是没有设密码的,可以在这里面修改原始记录。当然 前提是能接触到这个access数据库。如果也设置了密码,那么只能通过vba编码**密码实现更改记录。代码如下:
操作步骤:
1.打开需要**密码的excel;2.alt+f11,进入vba编辑界面;3.**-模块(module);4.在右边module的空白编辑区域,复制粘贴下面所有内容;5.f5,运行该vba命令;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 **
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&"s**e 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 th**"&_
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 th** 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 th** 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 boolean
application.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,vb**rmation,header
exit sub
end if
msgbox msgtaketime,vb**rmation,header
if not wintag then
msgbox msgnopwords2,vb**rmation,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),vb**rmation,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,vb**rmation,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),vb**rmation,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,vb**rmation,header
end sub
注意:如果代码执行有误,请把代码复制到记事本中,再复制出来,这样会把格式去掉,形成纯文本的格式。 20210311