statement.other.asp
<%@ LANGUAGE = VBScript %>
<% Option Explicit %>
<%
'----------------------------------------------------------------------
' statement.asp - SpeedGen ASP Sample Script
' (c) 2000-2002 Optimized Software Ltd. All Rights Reserved.
'----------------------------------------------------------------------
' This script demonstrates:
' - Reading data from an XML file or URL.
' - The =OFFSET Excel Function
'
' Notes:
' - Using Excel SpeedGen with XML requires MSXML 4.
' - This example uses an XML file but changing it to a URL is very
' simple, just put the URLs in XML1 and XML2
'----------------------------------------------------------------------
' Tip: Code Library at http://www.excelspeedgen.com/code
'----------------------------------------------------------------------
Dim XLS ' SpeedGen Object
Dim SrcBook ' Source Workbook
Dim XML1 ' XML File or URL #1
Dim XML2 ' XML File or URL #2
' Set the location of the XML files
XML1 = Server.MapPath("statement1.xml") ' You can use a URL instead
XML2 = Server.MapPath("statement2.xml") ' You can use a URL instead
' Create Excel File
Set XLS = Server.CreateObject("XLSpeedGen.ASP")
XLS.EstimatedSize = 50000 ' Set Estimated Output File Size (Critical for speed)
XLS.AddRS_XML XML1 ' Add RecordSource 1
XLS.AddRS_XML XML2 ' Add RecordSource 2
SrcBook = Server.MapPath("statement.xls") ' Location of Source Workbook
XLS.Generate SrcBook, "", True ' Generate SpreadSheet and Stream to Client, Open in Place
Set XLS = Nothing ' Destroy object when done
%>
This Code Sample is intended for use with Excel SpeedGen