Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export to excel

Status
Not open for further replies.

JimFL

Programmer
Jun 17, 2005
131
0
0
GB
Hi,

Can anybody tell me if there is a way that I can export to excel and include a form that can then be resubmited back to my asp?

I know how to generate the form at the asp end by changing the document headers as

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


I need to create a dynamic excel file that generates my latest questions in a questionaire. The user will be able to save the form as they complete it and then once they have finished they will be able to press a button on the excel sheet to send the info back to another asp page. I am not sure if this is the correct forum for this but if anybody can point me in the right direction I would be grateful.

All of the form components are read by Excel but the form submit button doesnt seem to work? will it not work this way?

Apreciate your thoughts.
JimFl

 
Excel applications are not made to be web browsers, so no the submit button will not work the way you intend without a great deal more trickery. Off the top of my head I think you would have to use the Excel ActiveX object on the server and a template that already has VBA code in it to instantiate an XMLHTTP object, scrape the excel worksheet, and send the data back to your website. Another option would be to have them re-upload the excel file when they are done and have an upload script on the server that would scrape the data back out of the excel sheet.
Is there a reason your giving them an excel sheet to answer the quiz and then trying to get it back? If your looking for some sort of easy way for them to get a random quiz, take it offline to finish it, then upload it back in, you might want to look into the possibility of using Infopath, since it has some built in capabilities in this direction.

More details might be helpful, as I am not sure what your trying to accomplish.

-T
 
Hi Tarwn,

Thanks for your reply - I think the first option you are speaking about may be the best solution for my project. I need to use an excel spresadsheet as the users are familiar with this application and it should provide them with the necessary functionality to take the test.

Im going to have to take a crash course on VBA programming and also look at the XMLHTTP object.

There is no point going into more detail at this stage as I just wanted to get an idea of the track I needed to take. If I have any further questions regarding this matter I will post them up.

Many thanks again
JimFl

 
Would it be possible to use ASP to Transform an XML-Persisted ADO Recordset into an XML Spreadsheet that has already been created with my specified template?

Ie I would be able to setup a template in Excel that would have the necessary functionality pre installed and I would use XML to bring in a new data set each time a procedure is run from the website?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top