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

Edited 5 Years Ago by debasisdas: n/a

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

Thank you so much

This question has already been answered. Start a new discussion instead.