do any of you know how to create an excel file which can display a table from Sqlite using python?
1 Answer
You can use pandas read_sql_query function with a query and your sqlite connection as arguments
sql_query = pd.read_sql_query (
'SELECT * FROM YOUR_TABLE',
conn
)
df = pd.DataFrame(sql_query, columns = ['COL1', 'COL2', 'COL3'])
df.to_excel("YOUR_TABLE.xlsx")
You will also need to install openpyxl with pip to run to_excel