"Brent Bortnick" <Br***********@ discussions.mic rosoft.com> wrote in message
news:B2******** *************** ***********@mic rosoft.com... 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.
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.Conten tType = "applicatio n/vnd.ms-excel"
Response.AddHea der
"Content-Disposition","a ttachment;filen ame=<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.FileS ystemObject to create
the document.
If you wanted to try to do something else, then do as Anthony suggests
- provide a bit more detail.
--
Mike Brind