import pandas as pd
f = open("F:/Windows事件数据完整版.txt",encoding='utf8')
content = pd.read_table(f,":::",header = None) # ":::"表示txt文档数据字段是以:::分隔,如:端口:::事件名称:::事件描述
content.to_excel("F:/Windows事件数据完整版.xlsx",index = False)
print(content)
import pandas as pd
f = open("F:/Windows事件数据完整版.txt",encoding='utf8')
content = pd.read_table(f,":::",header = None) # ":::"表示txt文档数据字段是以:::分隔,如:端口:::事件名称:::事件描述
content.to_excel("F:/Windows事件数据完整版.xlsx",index = False)
print(content)