export sql server 2000 table of results to excel 2007

Hi, I have written a query and I want the results of this query to be exported into an excel 2007 spreadsheet. I have looked this up but I don’t really understand what I have to do. I have seen some people talk about an export wizard but is there a way of just wring a bit of code which can accomplish this? Thanks 

 

0
young345
5/4/2009 3:46:54 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

2 Replies
670 Views

Similar Articles

[PageSpeed] 3

You can do using ADO.Net

refer these

http://www.aspsnippets.com/post/2009/01/31/Export-Data-To-Excel-using-ADONet.aspx

http://support.microsoft.com/kb/316934


MAKMark as Answer if this reply helps you
MVP ASP/ASP.Net
MVP ASP/ASP.Net
ASP.Net Hosting : Host DepotMy Site : ASPSnippets
0
mudassarkhan
5/4/2009 3:58:49 PM

Another option would be

1. Write SQL Code & save that as .SQL File (please note ',' as part of  selection)

Example:  Select  Col1, ',',  Col2, ',', Col3,...   From .....

2. Execute this SQL as part of SQL Job, output as ".csv" file

3. Open .CSV file in Excel

 Btw, this is just an option, may be good or bad :)

0
prabhupr
5/4/2009 10:51:08 PM
Reply:

Similar Artilces:

SQL Server Reporting Services for SQL SERVER 2000 AND Visual Studio.NET 2005 .NET 2.0
Hi, Which version of SQl Server Reporting Services will work with SQL SERVER 2000 in pararrel with ASP.NET 2.0 (.NET 2.0 framework)?  Thanks, Azam HighOnCodingWanna get high! Hi, Okay I got the answer. Yes, we can use the SQL SERVER 2005 Reporting Services with SQL SERVER 2000. HighOnCodingWanna get high! ...

Relational Tables are not relational after Exported from my sql server to host sql server
hello, I am beginner for asp.net and sql server. I used Sql server manegement studio full version and I exported my aspnetdb which was created by VS2005 to my host sql server. I have a question:  relational tables are not relational no longer. I noticed that when I created database diagram. what is wrong by exporting? thanks for your helps...Amateur Web Designer and Programmer In the Wizard steps are you specifying the keys? this dialog box will come when you uncheck the "Use default options" checkbox and click on options buttonscase when an...

SQL Server 2005 Installation problems with SQL Server Express & SQL Server 2000
Hi Guys, I have had SQL Server Express and Sql Server Management Studio Express installed on my machine for some time and recently tried to install a trial of SQL Server 2005 as well.  (Yes, I'm migrating from Visual Studio Express to Visual Studio Professional, just as in tended!) Everything went fine except that nothing seemed to be installed.  I searched in all the obvious places - both on the Start/Programs menu and on the hard-drive: nothing. A check under Add/Remove Programs showed that Sql Server 2005 Express was installed, but called SQL Server 2005. So after a number o...

Exporting data from Excel Tables to SQL Server Tables
Hi all,  I have a large Excel file with one large table which contains data, i've built a SQL Server DataBase and i want to fill it with the data from the excel file.   How can it be done?     Thanks, Michael.  If you are using SQL 2000 Standard or better, use DTS.If you are using SQL2005/8 Standard or better, use SSIS.If you are using SQL 2005/8 Express, get the Graphical User Interface for it and try that out.p.s. What version of SQL Server are using? Don't forget to click "Mark as Answer" on the post that helped you.This credits that...

This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers
When I connect SQL Server 2005 to a remote database i get the error: "This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers". Can I confirm it is because: the remote db is of SQL Server 2008? There is a soln mentioned in http://forums.asp.net/t/1324047.aspx Did anybody try this (installing 2008 express: http://www.microsoft.com/express/sql/download/)? I am just checking again, whether it will disturb my existing SQL Server installation, in any means...? Though it is mentioned that it will g...

SQL Server 2000 and SQL Server 2005 in the same server
Can enyone please send me a link to a white paper explaining how to run both SQL Server 2000 and 2005 in the same machine?Thanks. I don't know about the white paper but I had both running on my machine for a while by making the SQL 2000 a named instance. So for SQL 2005 connection strings my server name was (local) while for SQL 200 using the named instance it was (local)\joesql where joesql was the instance nameHope it helps,Joe http://www.joeaudette.comhttp://www.mojoportal.com...

SQL Server 2000 Developer vs SQL Server 2000 Standard
I have installed the SQL Server 2000 developer that came with Office XP Developer. I now have a copy of SQL Server 2000 Standard. What will happen if I try to install the standard version? Will I loss any of my current database logins or settings, etc...? Thank you for any help,Thank youJackxxx Upgrading your version of SQL Server 2000 should not result in the loss of any information that you already have set up. I believe you can/should choose "Upgrade, remove, or add components to an existing instance of SQL Server" when you go to install SQL Server 2000 Standard. TerriT...

SQL SERVER 2000: In which format the datetime will be stored in sql server 2000?
Hi All, I would like to know, how the datetime will be stored in the sqlserver datetime column. Because some time i am giving the date in dd/mm/yyyy and sometime mm/dd/yyyy. while give the date in mm/dd/yyyy works fine but not in the another case. and also while i execute a query on query analyser it shows the datetime in yyyy/mm/dd format. So anyone can please tell me how the dates will be stored in the datetime column of sqlserver database? Thanks in Advance. Regards, Dhanasekaran. G Storing of datetime depends upon the globalization setting. Normally the date time is stor...

Bulk Copy between remote SQL Server 2000 and local SQL Server 2000
How to perform Bulk Copy of a table from a Remote SQL Server 2000 to Local SQL Server 2000?I need to do this programmatically. This will be performed on regular basis. I can't use DTS Import/Export Wizard. Need the steps of Bulk Insertion.Thanks in advance. With Regards,Prodipta Mondal.Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread. Need the steps of Bulk Insertion.  Connect to the remote SQL Server. Load a DataTable or DataReader Connect to the local Server Call the SQLBulkCopy,WriteTo...

sql server 2005 to sql server 2000
Due to certain unavoidable reasons we have to move an application from sql server 2005 to sql server 2000 (yes from 2005 to 2000).  would changing the connection string be sufficient or are there other issues involved. How hard is it going to be to get it to work? Any tips or suggestions are greatly appreciated. Yes you will need to change the connection string!However you must look very carefully at the database structure. Do two script exports of every object in the database - one for SQL2000 compatibility and one without. Compare these two scripts, if they are significantly differe...

I imported a SQL Table into SQL DataBase, But I can not update this table even with SQL Server management Studio
I imported a SQL Table into SQL DataBase, But I can not update this table even with SQL Server management Studio When I change any data on mentioned table above, Red exclamation sign appears left of the record . How can I correct this problem?  Thanks. Try running the UPDATE via Query Analyzer...and see if you get an error.***********************Dinakar NethiLife is short. Enjoy it.***********************...

Why I cannot create/edit tables in VS.Net Server explorer for SQL Server 2000 Developer local database?
I found that when I install MSDE, then I can create/edit database objects for MSDE database in Visual Studio 2003 Server Explorer, but when I try to create/edit database objects under the default database created by the SQL Server 2000 installation, I cannot do these tasks as no option for these tasks appear when I right-click on the database object in Server Explorer.  Anyone knows why this is happening?sun21170 I reproed your issue. And I found in MSDN it is said the Server Explorer can: -Open and view Server Explorer -Add a data connection -Add a server -Drag a...

Export Excel to SQL Server 2005 Tables
 I am trying to export the excel to sql server table. I wrote a piece of code that is helping me in exporting the excel to one of the table... the problem is, incase if i have just two columns in excel, and 5 columns in sql server table, i am getting an error..."No value given for one or more required parameters." if it were two columns in excel and two columns in sql, its exporting wid out any problem.... i think i made my point.....cud u guys help me out there.... I am also posting the original code here..... protected void Page_Load(object sender, EventAr...

How can i import records from a sql server table in project1 to another sql server table in project2
Hi, i have a table with all employee bio-data in a completed project. Iam now working on another project with a table that needs the same data and here iam talking about 300 records that rarely change. Instead of re-entering this data in this new table, i want to import the data from the completed project into a table in this new project. Does any one have any idea how to achieve that or is there a better option to do the same. One more thing iam realising here is that iam going to use this same data in very many applications and some one from one department is going to ...

Web resources about - export sql server 2000 table of results to excel 2007 - asp.net.sql-datasource

Result - Wikipedia, the free encyclopedia
A result (also called upshot ) is the final consequence of a sequence of actions or events expressed qualitatively or quantitatively. Possible ...

Facebook To Announce 1Q 2013 Financial Results May 1
Facebook has been a busy company in the past fiscal quarter, launching a redesigned News Feed and Timeline . Facebook will share how it did financially ...

James Hardie posts solid Q2 results
JAMES Hardie reported group adjusted net operating profit for the quarter was flat at US$65.3 million (A$91.9 million) and up 12% for the half ...


HP Enterprise Rises, HP Inc. Falls: FYQ4 Results Miss
... formally split in two this month, this evening announced a joint fiscal Q4 report for the three months ending in October, which gave results ...

WWE Survivor Series 2015 Results: Winners, Grades, Reaction and Highlights
WWE Survivor Series 2015 climaxed amid a ring covered in confetti—an unfulfilled feeling hanging over it all...

Full results of the poll - The Boston Globe Full results of the poll - The Boston Globe
BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. ...

Nestle Investigation Results: Yep, Your Cat’s Food May Have Been Caught By Slaves
In a series of recent lawsuits, consumers have taken issue with the treatment of workers on fishing boats from Thailand that work far out to ...

Google to Include Facebook Posts in Mobile Search Results
Google will serve up Facebook content in mobile search; the next Google Glass version could be display-free; Microsoft opens a Cyber Defense ...

Keurig's Stock Gets A Pick-Me-Up After Quarterly Results Exceed Expectations
... stock skyrocketed 20% in after-hours trading on Wednesday, after the Vermont-based company posted better-than-expected quarterly results and ...

Resources last updated: 11/25/2015 1:23:40 AM