Right now I copy a whole table from a website, paste it into a cell on an excel spreadsheet and it formats it into a .csv file.
After the .csv is made I upload the file into my database via a Django app.
I also have a model form if I wanted to enter the data manually.
What I was wondering is if there is a way to skip a step to make the process faster. Maybe copy the table from the web and paste it into a form cell and it gets formatted like excel does.
Any tips or ideas are greatly appreciated.
If you do not mind using pandas, you can try something like:
import pandas as pd
import sqlite3
df = pd.read_clipboard() # table was copied to clipboard from https://www.w3schools.com/html/html_tables.asp
conn = sqlite3.connect(":memory:")
df.to_sql("mytable", conn)
pd.read_sql("select * from mytable", conn)
df.to_csv("mytable.csv") # if CSV is needed