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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML / XML

Status
Not open for further replies.

dalgra

MIS
Sep 6, 2001
2
US
Hi everyone,
I have a dynamic list page in ASP which works pretty good. I added a link that will export the data on that dynamic page into MS Excel - that works pretty well too. Now, I'm trying to add the title to the Excel file and tab name (default is Sheet1).
This is what I have thus far, but with an error message:
------------------------------------------------------------
<!-- Begin Excel Export -->

<%
' *** Download Excel File Format.
Download = request.querystring ("download")

If Download = "excel" Then
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=Yourfilename.xls"
<html xmlns=" xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice" xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel">
<head>
<title>Title</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Subject>Subject</o:Subject>
<o:Author>Author</o:Author>
<o:Keywords>Keyword1, Keyword 2</o:Keywords>
<o:Description>Comment Line 1&#13;&#10;Comment Line 2</o:Description>
<o:Category>Category</o:Category>
<o:Manager>Manager Name</o:Manager>
<o:Company>Company Name</o:Company>
</o:DocumentProperties>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>Worksheet Name</x:Name>
<x:WorksheetOptions>
<x:protectContents>False</x:protectContents>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml>
<![endif]-->
<style>
<!--
br {mso-data-placement:same-cell;}
-->
</style>
Else
<head>
<title>Intec Administration - Event Registrations Listings</title>
'The rest of your header info...
------------------------------------------------------------

But I'm getting an error message in the browser saying:
------------------------------------------------------------
Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/inteclink/admin/events/eventReg.asp, line 261
<html xmlns=" xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice" xmlns:x="urn:schemas-microsoft-com:eek:ffice:excel">
------------------------------------------------------------

Any help will be greatly appreciate it.
Thanks in advance,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top