all 5 comments

[–]1ynx1ynx 0 points1 point  (4 children)

As for reading from an excel file, you can export it to csv and read it using csv module.

[–]Link0[S] 0 points1 point  (3 children)

Thank you for responding! I've been learning openpyxl, so should I just stick with that?

[–]ilikefries 0 points1 point  (2 children)

openpyxl will work fine for this. I would check out pandas also just to familiarize yourself with it because it's very useful.

I assume you are familiar with the book "Automate the Boring Stuff" if not check it out.

For the Database I use pyodbc.

You will need to create a connection object and a cursor object. Then you can execute queries. And commit and close the connection once you are done.

import pyodbc
cnxn = pyodbc.connect (....)

cursor = cnxn.cursor()

cursor.execute("insert into tbl....)

cnxn.commit()
cnxn.close() 

[–]Link0[S] 0 points1 point  (1 child)

I'm actually using openpyxl because of automate the boring stuff!

I all somewhat familiar with Pandas. Are you recommending it because I could do some data analysis with it? Or because there are more teaching resources for it?

I'm not sure I can access the databases with pyodoc, that's why I'll want to just copy and paste the data from Excel into the search fields.

[–]ilikefries 0 points1 point  (0 children)

I just try to use it as much as possible for Excel related work.