Skip to content Skip to sidebar Skip to footer

Getting Excel Data Into Database - Beginner

I have written some Python code that scrapes information and puts it into several different excel files depending on what the data is. Usually around 8 separate excel files. I am w

Solution 1:

I think you should keep using CSV instead of calling it excel. To integrate with excel you need to work with COM interop, which will be a huge story.

If you already have pandas, then the best route is probably just use pandas to connect to SQLLite since you already have code written to save to csv.

Working with SQLite Databases using Python and Pandas


Solution 2:

Sqlite is an extension on mozila or chrome, it is simple to use as a database. I think it will be a suitable solution for you as beginner. First, you have to install the extension for chrome from here : https://chrome.google.com/webstore/detail/sqlite-manager/njognipnngillknkhikjecpnbkefclfe?hl=en

Second: I would highly recommend following this tutorial: https://www.youtube.com/watch?v=ebYMbi_0Www&list=PLQjJhFzhbHlAYWuHE-P-gC0FRwKn6cCDK


Solution 3:

As i understand you have to install SQLLite using this site [https://www.sqlite.org/download.html]

And then install the python package - sqlite3 and use this below code to connect to your database Here is one more link about using python to insert data in sqllite enter link description here

import sqlite3

conn = sqlite3.connect('test.db')

print ("Opened database successfully")

Post a Comment for "Getting Excel Data Into Database - Beginner"