4

I try to copy data from a table in SQL Server 2005 into a excel spreadsheet. Since that sheet is linked to some external charts, so I have to overwrite the existing data with the updated data from SQL Server table. I want to do it through linked servers. But failed several times. Do someone knows how to do it?

Thanks in advance

marc_s
9,0626 gold badges46 silver badges52 bronze badges
asked Feb 10, 2012 at 14:59
4
  • 2
    Can you give more details on the failure? Error message? Symptoms? What provider are you using for the linked server? 64 Bit or 32 Bit? Commented Feb 10, 2012 at 16:41
  • Yes, more data please! Commented Feb 11, 2012 at 2:49
  • The question isn't clear. Are you trying to load the data into excel through MSQuery - with a query that joins something in the local server against a table in the remote server? If that's the case and MSQuery's spitting the dummy on the syntax you could try putting a view over it and pointing MSQuery at the view. Commented Feb 15, 2012 at 16:22
  • Why must you use a linked server? Commented Sep 5, 2012 at 19:55

3 Answers 3

3

I think you are looking at this from the wrong point of view. You don't want SQL to upate your spreadsheet, you want your spreadsheet to connect to your database and get the latest data.

Create a local DSN -- using "setup data sources (ODBC) -- then connect to that data source from excel.

answered Sep 5, 2012 at 16:10
0

You can use SSIS (SQL Server Integration Service) for convert data from each source such as MSSQL to each distination such as excel. create package is ssis for convert data and run it each time you want copy data to excel file.

answered Jun 7, 2012 at 3:32
0

You can connect directly from Excel to SQL Server using the "Get External Data" option under the Data menu in Excel - you should see a SQL Server option. The only pre-requisites are that you have an account with permission to query the database and that you have the appropriate drivers installed on your machine.

I hope this helps you.

answered Sep 5, 2012 at 19:52

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.