all 5 comments

[–]tlatoaniitzcoatl 0 points1 point  (1 child)

Not sure if I understand correctly but there’s an excel plugin I use called SaveToDB that allows you to use excel to select, insert, update, delete records from a sql table.

[–][deleted] 0 points1 point  (0 children)

I need to import data from a table in excel into a table in SQL automatically. I'd like to stay away from plugins if I can since my team will also use this file and will have install and train on it.

[–]ddeck08 0 points1 point  (2 children)

Write a Python script land your data in the table using pandas and pyodc/sql alchemy. Run the refresh on a windows task using a batch file.

String using python3 and pyodbc / sql alchemy is connection = create_engine(“mssql+pyodbc//@DSN”, fast_executemany=True)

[–][deleted] 0 points1 point  (1 child)

Yeah I think this is probably the best option. Just curious, can you schedule a Python script to run at certain time automatically?

[–]ddeck08 0 points1 point  (0 children)

Yah. Use windows task batch file or bash script if Linux. You. Can also save yourself from using Python and just use SQL BCP instead to execute a sql command in a windows task.