I’d like to import an xlsx file into sqlite while preserving text formatting. I’ve read openpyxl does this. I’m using the following:
import pandas,openpyxl,sqlite3
from os import path,remove,system
import tkinter as tk
from tkinter import ttk
schedule=pandas.read_excel('schedule.xlsx',sheet_name='schedule',engine='openpyxl')
connection=sqlite3.connect('schedule.db'); cursor=connection.cursor()
cursor.execute('CREATE TABLE schedule (date,time,activity)')
schedule.to_sql('schedule',connection,if_exists='append',index=False)
The file imports well but activity lacks formatting. The formatting is simple - bold, underline, and italic. How do I import the formatting?