+++++++++++++++++++++++++++++++++++++++++++++++++
This code executes a query into a SQL Server Database, then generates a XLSX file and saves it to a local directory. It uses Pyodbc as connection interface and Pandas library for data handling an exporting methods.
- Clone this repository
- Environment setup
python3.9 -m venv venv
- Install required packages
pip3 install -r requirements.txt
- Edit file config.json and replace sample values with your connection strings.
- Create environment variable called myAccessToken for gathering SQL Server user password - Here, how to create environment variables and if you work with Windows like me check out this
- Create output folder c:\output\
- Execute program
python3.9 hpsalesreport.py
Feel free to use this code - Hope you enjoy it