Showing posts with label exel. Show all posts
Showing posts with label exel. Show all posts

Thursday, March 22, 2012

exporting data from exel to a database..

Is there a way to export data in excel to MS SQL server, or Access?
thanksIn Enterprise Manager, Data Transformation Services, Local Packages, right click, create new package. On the left side of the screen is an EXCEL icon. You can use that to read from a spread sheet and insert into a table. You can then schedule the package to run or run it manually as needed.

Originally posted by ab8140
Is there a way to export data in excel to MS SQL server, or Access?

thanks

Wednesday, March 7, 2012

Export to Exel

I am newbie in exporting data.

i am using visual studio.net 2003 and using vb.net to create a webapplication.

My problem is how do i query my data from MS-SQL and export to microsoft Exel??

Can some one gave me the sample code?

Thanks

I had success to export my data to exel,

but why must i save the file before i open it??

Can anyone help me solve this problem??

My coding is Below :

Dim

rAsNew Columnar_Landed

r.SetDatabaseLogon("username", "password", "192.xxx.xxx.xxx,xx", "DTZ-VMS")

r.RecordSelectionFormula = query

Dim oStreamAsNew MemoryStream

oStream = r.ExportToStream(CrystalDecisions.Shared.ExportFormatType.ExcelRecord)

HttpContext.Current.Response.Clear()

HttpContext.Current.Response.Buffer =

True

HttpContext.Current.Response.ContentType = "application/vnd.ms-excel"

HttpContext.Current.Response.BinaryWrite(oStream.ToArray())

HttpContext.Current.Response.End()

|||

Please search the forum. You will find a lot of material on it. Search by "Gridview to excel". one important link is:

http://forums.asp.net/thread/1573815.aspx

Please mark this post as resolved if you r done