# Importing formatted Excel text to sqlite

**URL:** <https://discuss.python.org/t/importing-formatted-excel-text-to-sqlite/52502>\
**Category:** Python Help\
**Created:** [May 3, 2024, 12:43pm UTC](https://discuss.python.org/t/importing-formatted-excel-text-to-sqlite/52502 "2024-05-03T12:43:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhubarbpieguy](https://avatars.discourse-cdn.com/v4/letter/r/58f4c7/32.png) [@rhubarbpieguy](https://discuss.python.org/u/rhubarbpieguy)\
**Post date:** [May 3, 2024, 12:43pm UTC](https://discuss.python.org/t/importing-formatted-excel-text-to-sqlite/52502/1 "2024-05-03T12:43:24Z")

</div>

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:

```python
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?
