Reputation: 79
I have a html file and there are some tables, and I want to convert this html to Excel. Actually I can copy all page and paste it in Excel but I will have to repeat this process other html files. Can I use python for this process?
Upvotes: 0
Views: 1507
Reputation: 2605
You can use Pandas in Python.
import pandas as pd
df = pd.read_html(html_file)
writer = pd.ExcelWriter('pandas_simple.xlsx', engine='xlsxwriter')
df.to_excel(writer, sheet_name='Sheet1')
writer.save()
Upvotes: 0