Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 writing to microsoft excell sheet from mssql-2000

Author  Topic 

alo
Starting Member

6 Posts

Posted - 2003-06-07 : 08:23:26
Hi,

Need ur help !

Need to write data to excell sheet from mssql-2000 and veceversa. Could someone help me saying how to do it?

Thanks.

alo

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-06-07 : 08:45:16
Data Transformation Services (DTS) is one way to go. If you run Enterprise Manager, and run the Import/Export Wizard, you'll be able to choose the settings to import/export to and from an Excel workbook.

From Excel, you can also use the Get External Data function. This allows you to design a query for your SQL Server data and refresh it any time. This is probably the best and easiest way to go, because the end user does not have to bother with SQL Server once the queries are set up, they can simply hit the refresh button whenever they need new data. The only downside is that the user must be able to connect to the SQL Server over the network, so it will not work in an internet environment.

You can also use the bcp utility to output data in comma-separated or tab-delimited formats. Excel can read these formats natively and convert them upon opening. bcp is not that hard to use, but it is a command-line utility and doesn't have a fancy interface. Look it up in Books Online for more information.

Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2003-06-07 : 13:40:08
I wrote an ASP procedure to build an excel file. Here's a thread that spoke about the experience.

[url]http://sqlteam.com/Forums/topic.asp?TOPIC_ID=24638[/url]

Sam

Go to Top of Page
   

- Advertisement -