Hey everyone, I am trying to create an excel spreadsheet that is populated with data from a table in sql server. I would like to make it so it will update several times a day with out the user having to do so. I have no clue how to go about this. I was hoping one of you could point me in the right direction. Thanks!

Recommended Answers

All 2 Replies

I've done something similar in the past with a web application where a user clicks a buton to export data displayed in an asp.net gridview (populated by SQL) to an Excel spreadsheet.

You have the data in SQL. You need some type of program to export, maybe a vb.net or c#. Alternative, MSSQL is very powerful, where maybe you can create a stored procedure, or run a scheduled job that SQL can exectute.

A quick search online resulted in the BCP utility. Looks promising for what you are asking for. rather than exporting to an .xlsx file, you can export to .csv which can easily be opened by Microsoft Excel.

its a start...

In Excel 2003 (the version I have) you can import the data directly from the database table by defining a query from DATA -> IMPORT EXTERNAL DATA -> NEW DATABASE QUERY

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.