在线试用
微信扫码联系专属客服
安企神软件官网
首页
客户列表1
客户列表
客户列表1
关于安企神

excel表格数据加密怎么解除

2023-03-14

近年来,随着互联网技术的日新月异,数据加密已成为一种重要的信息安全技术。Excel表格作为办公软件中不可或缺的一部分,其数据加密功能可以很好地保护用户数据的安全。但在实际操作中,有时我们可能会遇到需要解除Excel表格数据加密的情况,本文将介绍Excel表格数据加密解除的方法,希望能够对读者有所帮助。

一、Excel表格数据加密的类型

Excel表格数据加密主要有两种类型:

1.文件加密:它是对整个Excel文件进行加密,只有拥有正确密码才能打开Excel文件,且该密码应谨慎保存。对于未加密的Excel文件,可以在文件>信息>保护文档中进行密码保护。

2.工作簿和工作表的加密:它是在Excel表格中单独对工作簿和工作表进行加密,只有拥有密码才能编辑和查看加密后的工作簿和工作表。可以通过右键单击要加密的工作簿或工作表,在弹出的菜单中选择“保护工作簿/工作表”进行加密。

二、Excel表格数据加密解除的方法

1.文件加密的解除

要解除Excel表格的文件加密,只需输入正确的密码即可,但如果没有正确的密码,则无法解密。如果你忘记了密码,可以通过以下步骤恢复:

步骤一:打开加密的Excel文件。

步骤二:在输入密码前,按下“Shift”和“F11”键,将打开Visual Basic编辑器。

步骤三:在Visual Basic编辑器中,依次点击 工程(Project)>插入(Insert)>模块(Module),将在编辑区域中生成一个新的模块,然后复制以下代码:

Sub PasswordBreaker()

‘ ——————————————–
‘Breaks worksheet password protection.
‘———————————————

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 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

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)
Exit Sub
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
End Sub

步骤四:点击“运行”按钮,将会短时间内破解Excel表格的密码。

2.工作簿和工作表加密的解除

要解除Excel表格中工作簿和工作表的加密,可以采取以下两种方法:

方法一:通过输入正确的密码进行解密

如果你已知道工作簿或工作表的密码,那么只需在进行编辑和查看时输入正确的密码即可,这种解密方法非常简单。

方法二:通过Visual Basic代码移除工作簿和工作表的加密

步骤一:打开需要解密的Excel表格。

步骤二:按下“Alt+F11”键打开Visual Basic编辑器。

步骤三:在Visual Basic编辑器中,依次点击 工程(Project)> 插入(Insert) > 模块(Module),在模块的编辑区域中输入以下代码:

Sub PasswordBreaker()
‘ ——————————————————————
‘ Breaks worksheet and workbook structure passwords.
‘ Derived from a macro by Daniel Klann
‘ ——————————————————————

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

Dim wks As Worksheet, wksNew As Worksheet
Dim cnt As Long, t As Double
Dim arr() As Variant, arr2() As Variant

On Error Resume Next

‘=== get shts and names
cnt = 0
For Each wks In ActiveWorkbook.Worksheets
cnt = cnt + 1
ReDim Preserve arr(1 To cnt)
arr(cnt) = wks.Name
Next wks

‘=== get internal names
cnt = 0
For i = 1 To ActiveWorkbook.Names.Count
cnt = cnt + 1
ReDim Preserve arr2(1 To cnt)
arr2(cnt) = ActiveWorkbook.Names(i).Name
Next i

‘=== brute force
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

On Error Resume Next
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 ActiveWorkbook.ProtectStructure = False Then

ActiveWorkbook.NotifyOnUndo = True

‘=== show passwords on the sheet
Set wksNew = ActiveWorkbook.Worksheets.Add
On Error Resume Next
wksNew.Name = “TEMPORARY TO DISPLAY PASSWORDS”
On Error GoTo 0
With wksNew
.ResetAllPageBreaks
.Range(“A1”).Value = “Worksheets:” & vbNewLine
.Range(“A1”).Font.Bold = True
For Each wks In ActiveWorkbook.Worksheets
.Range(“A1”).Value = .Range(“A1”).Value & vbNewLine _
& wks.Name & vbTab & wks.Index & vbTab _
& wks.Visible & vbTab & wks.ProtectContents & vbTab _
& wks.EnableOutlining & vbTab & wks.PageSetup.Order _
& vbTab & wks.PageSetup.CenterFooter
Next wks
.Range(“A1”).Value = .Range(“A1”).Value & vbNewLine & vbNewLine _
& “Named Ranges:” & vbNewLine
.Range(“A1”).Font.Bold = True
For i = 1 To ActiveWorkbook.Names.Count
On Error Resume Next
.Range(“A1”).Value = .Range(“A1”).Value & vbNewLine _
& ActiveWorkbook.Names(i).Name & vbTab _
& ActiveWorkbook.Names(i).RefersTo
Next i
With .Rows(“1:1”)
.HorizontalAlignment = xlCenter
.WrapText = False
.Font.Bold = True
End With
Zoom = True
End With

‘=== return control to user
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)

Exit Sub

End If
For Each wks In ActiveWorkbook.Worksheets
wks.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)
Next wks
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next

MsgBox “No password was found.”

End Sub

步骤四:点击“运行”按钮,将会短时间内破解Excel表格中工作簿和工作表的密码,然后你就可以获得编辑和查看权限。

以上是解除Excel表格数据加密的方法,读者可以根据自己的实际情况进行选择。要保护好Excel表格中的数据安全,我们应该根据需要进行加密,但也要注意保存好密码,避免忘记或丢失。同时,为了保护个人或公司的机密信息,我们也要提高安全意识,加强信息保密。

  • TAG: