Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dump data to excel from SQLServer: XML, BCP, DTS?

Status
Not open for further replies.

Earth

Technical User
May 8, 2000
59
AU
Hello,

I'm trying to determine the best solution for a problem. My SQLServer db has a jsp/java front end - intranet based. I want to give my users the ability to dump data into excel with the press of a button on the interface. I have a stored procedure written that returns the correct data (as a normal recordset).

As far as I can figure out (from reading all the Excel threads here), I have the following options:
1. Using DTS. I guess I either call a SP that starts the DTS, or start the DTS directly from my java code.
2. Return the results of my SP as txt or xml to my java code, and let it figure out how to plunk the data into excel (I think this is the BCP thing?).

What are the advantages/disadvantages of these two methods? Is there a simpler way? (syntax in a stored proc that allows you to specifiy opening excel and dumping the data there springs to mind :))

Thanks in advance,

Michele
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top