sql-server

How to automatically push data from Excel file to SQL Server?


How can one push data from an Excel file into my SQL Server?


I tried to get data from the database into an Excel file but I don't know how to push the new data and the users won't click the button to push data every time.

So if someone knows how to sync a SQL Server database with the Excel files in order to get that data automatically, I would really appreciate it.


Solution

  • I will look forward to two options in this scenario:

    SSIS Package: Use SSIS package which picks up data from a specified path (your excel), which inserts new rows and updates existing ones. Schedule this package with SQL Job agent.

    Console App: Write a simple c# console app, which does the same and schedules it using windows scheduler.