ASP to Existing Excel Template

B

Brent Bortnick

Hello,

Is it possible to send data from ASP and put it into a existing template? i
don't want to create an excel document I only want to send one piece of
information from ASP to the Exisiting Template.

Background: We have created a online quote number genetrator for our sales
team and we want it to open the excel quote template and put the quote number
on that excel template.


Any Ideas?
 
A

Anthony Jones

Brent Bortnick said:
Hello,

Is it possible to send data from ASP and put it into a existing template? i
don't want to create an excel document I only want to send one piece of
information from ASP to the Exisiting Template.

Background: We have created a online quote number genetrator for our sales
team and we want it to open the excel quote template and put the quote number
on that excel template.


Any Ideas?

The procedure is unclear.

Do you want a user to initiate an ASP page that returns a new excel
spreadsheet based on a template and have the content of the sheet modified
by ASP?
 
M

Mike Brind

You probably don't want to do that. Subsequent order numbers will
overwrite the previous one. I suspect what you actually intend is to
use ASP to generate an individual Excel document that follows the
template you have designed, and insert your newly generated quote
number into the newly generated document, whilst also keeping any
previous documents.

If that is the case, then save the Excel template document as html,
open it up in an html/text editor and get the html source code. Create
an ASP file that will produce that html, inserting data wherever you
need it, and ensure that the following is put at the top of the ASP
file.

<%
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader
"Content-Disposition","attachment;filename=<filename>.xls"
%>

This will generate an Excel document called whatever you place instead
of <filename> in the AddHeader line. It will also force a download
dialogue box on the user's browser.

If you just want to create an Excel document somewhere on the server,
without forcing a download, you can do the same as above - ie reverse
engineer your template, then use Scripting.FileSystemObject to create
the document.

If you wanted to try to do something else, then do as Anthony suggests
- provide a bit more detail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top