Very urgent.How to use an existing excel template in ASP.

Trushna.Palo

New Member
Joined
Jul 24, 2008
Messages
3
The similar post is already posted in site.But since I am new to ASP I couldnt get the complete code.So help is highly appreciated.
My issue is on click of a button in a ASP page the predefined excel template should open with with the column filled up by the data which comes from the previous ASP page.
Let me tell you in details.I have a ASP page called "riskonloadexcel.asp" and a Submit button "Export to Excel" in it.On click of Export to Excel the template "Risk_Mgmt.xls" should open with the data filled up in it column which comes from "riskonloadexcel.asp" .

I tried using this subroutine:
Sub Test()
Dim wbNew As Workbook
Set wbNew = Workbooks.Add(Template:="D:\Risk_Mgmt.xls")
MsgBox wbNew.Name
End Sub

But it didnt work.
Can you tell me in details how to make it work.
If I can get the reply by tomorrow it would be really great as my delivery is pending bcoz of this.


Thanks in advance..
Trushna
 
Last edited:

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
:confused:
The similar post is already posted in site.But since I am new to ASP I couldnt get the complete code.So help is highly appreciated.
My issue is on click of a button in a ASP page the predefined excel template should open with with the column filled up by the data which comes from the previous ASP page.
Let me tell you in details.I have a ASP page called "riskonloadexcel.asp" and a Submit button "Export to Excel" in it.On click of Export to Excel the template "Risk_Mgmt.xls" should open with the data filled up in it column which comes from "riskonloadexcel.asp" .

I tried using this subroutine:
Sub Test()
Dim wbNew As Workbook
Set wbNew = Workbooks.Add(Template:="D:\Risk_Mgmt.xls")
MsgBox wbNew.Name
End Sub

But it didnt work.
Can you tell me in details how to make it work.
If I can get the reply by tomorrow it would be really great as my delivery is pending bcoz of this.


Thanks in advance..
Trushna
 
Upvote 0

Forum statistics

Threads
1,216,110
Messages
6,128,894
Members
449,477
Latest member
panjongshing

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top