还原IE的*.mht文件关联

 

//还原IE的mht文件关联.reg//

 

REGEDIT4
[HKEY_CLASSES_ROOT/.mht]
@="mhtmlfile"
"Content Type"="message/rfc822"
[HKEY_CLASSES_ROOT/.mht/ShellEx]
[HKEY_CLASSES_ROOT/.mht/ShellEx/{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
@="{EAB841A0-9550-11cf-8C16-00805F1408F3}"
[HKEY_CLASSES_ROOT/mhtmlfile]
@="MHTML Document"
[HKEY_CLASSES_ROOT/mhtmlfile/BrowseInPlace]
@=""
[HKEY_CLASSES_ROOT/mhtmlfile/CLSID]
@="{3050F3D9-98B5-11CF-BB82-00AA00BDCE0B}"
[HKEY_CLASSES_ROOT/mhtmlfile/DefaultIcon]
@="C://Program Files//Internet Explorer//iexplore.exe,22"
[HKEY_CLASSES_ROOT/mhtmlfile/shell]
@="opennew"
[HKEY_CLASSES_ROOT/mhtmlfile/shell/open]
@="Open in S&ame Window"
[HKEY_CLASSES_ROOT/mhtmlfile/shell/open/command]
@="/"C://Program Files//Internet Explorer//iexplore.exe/" -nohome"
[HKEY_CLASSES_ROOT/mhtmlfile/shell/open/ddeexec]
@="/"[url=file://%251/]file://%1/",,-1[/url],,,,,"
[HKEY_CLASSES_ROOT/mhtmlfile/shell/open/ddeexec/Application]
@="IExplore"
[HKEY_CLASSES_ROOT/mhtmlfile/shell/open/ddeexec/Topic]
@="WWW_OpenURL"
[HKEY_CLASSES_ROOT/mhtmlfile/shell/opennew]
@="&Open"
[HKEY_CLASSES_ROOT/mhtmlfile/shell/opennew/command]
@="/"C://Program Files//Internet Explorer//iexplore.exe/" %1"
[HKEY_CLASSES_ROOT/mhtmlfile/shell/opennew/ddeexec]
@="/"[url=file://%251/]file://%1/",,-1[/url],,,,,"
"NoActivateHandler"=""
[HKEY_CLASSES_ROOT/mhtmlfile/shell/opennew/ddeexec/Application]
@="IExplore"
[HKEY_CLASSES_ROOT/mhtmlfile/shell/opennew/ddeexec/IfExec]
@="*"
[HKEY_CLASSES_ROOT/mhtmlfile/shell/opennew/ddeexec/Topic]
@="WWW_OpenURLNewWindow"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MHT 文件转换为 Excel 可以采用以下步骤: 1. 使用 win32com 库将 MHT 文件打开为 InternetExplorer.Application 对象。 2. 使用 Beautiful Soup 库解析 MHT 文件中的 HTML。 3. 使用 pandas 库将数据导出为 Excel 文件。 以下是一个简单的示例代码,将本地 MHT 文件中的表格数据提取出来,并将其导出为 Excel 文件: ```python import win32com.client as win32 from bs4 import BeautifulSoup import pandas as pd # 创建 COM 对象 ie = win32.Dispatch("InternetExplorer.Application") # 打开 MHT 文件 ie.Navigate(r"C:\path\to\file.mht") # 等待网页加载完成 while ie.ReadyState != 4: pass # 解析 HTML soup = BeautifulSoup(ie.Document.body.innerHTML, 'html.parser') table = soup.find('table') # 提取表格数据 data = [] for row in table.find_all('tr'): cols = row.find_all('td') cols = [col.text.strip() for col in cols] data.append(cols) # 导出为 Excel 文件 df = pd.DataFrame(data) df.to_excel('output.xlsx', index=False, header=False) # 关闭 IE 对象 ie.Quit() ``` 在这个示例中,我们首先使用 win32com 库将 MHT 文件打开为 InternetExplorer.Application 对象。等待网页加载完成后,我们使用 Beautiful Soup 库解析 MHT 文件中的 HTML,并从中提取表格数据。最后,我们使用 pandas 库将数据导出为 Excel 文件。 请注意,使用该方法将 MHT 文件转换为 Excel 时,可能会丢失某些网页元素,例如 JavaScript 和 CSS 文件等。同时,在使用本地 MHT 文件时也需要遵守相关规定,避免触犯法律法规。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值