Download
the sample and unzip it. Copy the Template.xls excel file to "D:\".
Copy and run the stored procedure from PUBS database as sa. While running the
stored procedure, we can specify a name in which the resultant data will be generated;
else it will automatically generate the data in a file called "D:\Test.xls."

Title:
when i close the excel file, then automatically to excel data is save the sql server database
Name:
Buvaneshwaran.J
Date:
2009-04-28 3:53:11 AM
Comment: when i close the excel file, then automatically to excel data is save the sql server database....

Title:
Nice Article
Name:
Ravinder
Date:
2008-04-13 10:46:37 PM
Comment: Hey Thanks for the great information. I am new to SQL Server, had to to lot of job on servers without excel and this has saved me a lot of time.

While downloading an Excel file in internet explorer, it prompts an file download window with open,save and cancel buttons.On clicking on open button, it gives an error as "Could not open 'filepathtoopen'".Pls let me know how to rectify this error.

Regards,Srinivas AlwalaEmail : srinivas.alwala@yahoo.com

Title:
Generating Excel File Using SQL Server 2000
Name:
Francis
Date:
2008-04-01 9:39:58 PM
Comment: I am using SQL 2005 on a 64 bit platform. The 'Microsoft.Jet.OLEDB.4.0' provider is not working producing an error of The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered. I believe this is a 64bit OS issue. However, I have an urgent need to be able to delete and refill Excel files from my SQL code. Any ideas as to how I can manage this with our system?

Title:
numbers are being stored on the sheet as text
Name:
Nat
Date:
2007-12-20 12:32:41 PM
Comment: PLEASE HELP: The data is arriving in the Excel file but... the numbers are being stored on the sheet as text. Unfortunately the formatting of the TEMPLATE file does not work! Accounting can not use those files for analysis.

Msg 15281, Level 16, State 1, Line 1SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure. For more information about enabling 'Ad Hoc Distributed Queries', see "Surface Area Configuration" in SQL Server Books Online.

Title:
How to open Excel file which is already generated??
Name:
Shailesh
Date:
2007-11-21 11:28:55 PM
Comment: I can't open excel file from asp which is already generated...plzzz help me..

thanx

regards,Shailesh

Title:
MS-Excel file executing but not showing the data
Name:
Abdul Majeed
Date:
2007-11-10 3:29:50 AM
Comment: My problem is excel file not opening directly, Excel application working fine but not showing file data. if i open excel files Manually it then showing file data, I have reinstalled excel then also the same problem.

my problem is that, i want to genrate one file in .xls format. the record which is exist in excel sheet ,comes via sql query.plz give the excet format with correct syntex.tanks and best regardssaurabh

Title:
How to add instance of excelsheet in Sql database
Name:
safi1981
Date:
2007-09-04 2:25:49 PM
Comment: HiThis artical is really gud but do u have any idea how us save the instance of excelsheet in sql server database.

Title:
How to create Excel file
Name:
Rohith
Date:
2007-08-06 5:11:02 AM
Comment: i have created excel file using Excel9.0 object but at the client place its 10.0 its giving error as "Cannot create Activex component" pls Help me

bluefoster@rediffmail.com

Title:
How to create Excel file
Name:
Rohith
Date:
2007-08-06 5:07:59 AM
Comment: i have created excel file using Excel9.0 object but at the client place its 10.0 its giving error as "Cannot create Activex component" pls Help me

Title:
Query
Name:
Prashant
Date:
2007-06-07 6:30:46 AM
Comment: Hi,I have one problem i want to merge 10 excel files in to singel excel,excel file contain images also .but i have to do all this in my .net code.is there any way to do that

choudhary_prashant@rediffmail.com

Title:
Response to Creation of Excel file without Data
Name:
Rosemary
Date:
2007-05-29 5:44:22 AM
Comment: It's Excellent Article but I could not get the data in the excell file after running the procedure

While executing stored procedure if your Specified excel sheet is open then only you will get the following error

"OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error.OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.]."Just Checkout

RegardsChaitu

Title:
Got An error
Name:
Tirthesh Jain
Date:
2007-04-26 3:08:21 AM
Comment: While running the same Proc I am getting the under written Error Given by SQL Server 2000 and I am using the 2003 Excel version.

"OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error.OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.]."

Title:
Error
Name:
Narendra
Date:
2007-01-27 3:28:42 PM
Comment: I have created the Template of the Table structure, changed the column names and Table name. Run the scripts in Different Database. When I execute the procedure I got the following error:OLE DB provider 'Microsoft.Jet.OLEDB.4.0' supplied invalid metadata for column 'item'. The data type is not supported.OLE DB error trace [Non-interface error: Column 'item' (ordinal 1) of object 'SELECT item,Warehouse,Quantity FROM [Sheet1$]' reported an unsupported value for DBTYPE of 0].

Title:
Length of character in excel
Name:
?
Date:
2007-01-15 11:05:01 AM
Comment: This is very good article, when i tried this, i am getting an error if the number of the charters in the column inserting inot excel is more then 450. Any idea why it is causing this problem, any help is appreciated.

Title:
a Question
Name:
Adnan
Date:
2006-12-14 8:48:32 AM
Comment: Everything is good except i DO NOT want the column headers to show in the excel sheet. How do I go about doing that ?

Title:
Excellent man!!!
Name:
Beny
Date:
2006-11-29 1:25:18 AM
Comment: Ive been searching the net for this kind of excel generation for quite a long time....Keep up the goog work..!!!Excellent method...Is it possible for cross-mapping also??

Title:
Thanks
Name:
Rani
Date:
2006-09-12 4:03:23 PM
Comment: I got an emergency request to do exactly what is in this article and this article was the life saver for me. thank you so much Arvind for sharing this good article with us.

Title:
thanks
Name:
Ilango
Date:
2006-08-28 3:05:04 AM
Comment: This is a very good example for who directly extract the large amount of data from SQL server then store stright to the Excel file.

Title:
Good!
Name:
Umesh Kumar
Date:
2006-06-27 6:37:25 AM
Comment: Iam generating reports in excel and am having some problem in closing the excel instance after generating reports. I think this article may help a lot to me. Thanks Aravind!. Shall you help me to resolve my problem with this.