This project is a Python script that allows you to read data from an Excel file and import it into a SQL Server database. The script is designed to be generic, allowing you to configure the source Excel file, target SQL Server, and mapping of columns in a flexible manner.
Before using this script, ensure you have the following prerequisites:
-
Python: You need to have Python installed on your system. You can download Python from python.org.
-
Required Python libraries: Install the required Python libraries using
pip
: -
SQL Server: You must have access to a SQL Server instance, and you should know the server name and the database where you want to import the data.
- Clone the repository to your local machine or download the script directly.
- Configure your SQL Server connection by modifying the following lines in the script:
server = 'YOUR_SQL_SERVER_NAME'
database = 'YOUR_DATABASE_NAME'
python excel_to_sql.py
column_mapping = {
'Excel Column Name 1': 'SQL_Column_Name_1',
'Excel Column Name 2': 'SQL_Column_Name_2',
# Add more mappings as needed
}