Hi,

Does anyone know on how to convert vb.net to excel. I am new in this company and they are using Microsoft SQL Server Management Studio for their database.

FYI, they are using stored procedure as well.


Thank you

Hi,

Does anyone know on how to convert vb.net to excel. I am new in this company and they are using Microsoft SQL Server Management Studio for their database.

FYI, they are using stored procedure as well.


Thank you

In addition, I am using something like this to call the stored procedure

connect = "DRIVER=SQL Server;SERVER=;UID=;PWD=;DATABASE=;"
Set cmd = Server.CreateObject ("ADODB.Command")
cmd.ActiveConnection = connect
cmd.CommandText = "xxx"	
cmd.CommandType = adCmdStoredProc
cmd.CommandTimeout = 5000
cmd.Parameters.Append cmd.CreateParameter("@Mth",adVarChar,adParamInput,2,Mth)
cmd.Parameters.Append cmd.CreateParameter("@Yr",adVarChar,adParamInput,4,Yr)
Set rsA = cmd.Execute 
Set cmd = nothing

Thank you so much

how to convert vb.net to excel.

So you want to fetch the data from DB using stored procedure and export the data into an Excel sheet, right ?

But no where in your code it refers to any routine that writes to excel sheet.


the following links may be useful to you.

link1
link2
link3

Sorry for the long reply. I've actually referred to the first link and it works.

Thank you so much

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.