Introduction
  Welcome
  The Web Reporting Solution
  What is ExcelWriter?
  Features and Benefits
  New in This Version  V4
  Requirements
  Edition Differences
  Frequently Asked Questions
  Troubleshooting

Quick Start
  Creating Your First Spreadsheet
  Adding a Formula
  Adding Formatting
  Importing from a Database

Features In Depth
  Addressing Cells
  Setting Values
  Output Options
  Adding Charts
  Reading an Existing Spreadsheet
  Modifying an Existing Spreadsheet
  The Range Object
  Template Spreadsheets
  How to Use Templates
  ExcelApp.Open vs. ExcelTemplate
  Using ExcelTemplate with PivotTables
  Templates and Charts
  Reliable Spreadsheet Download  V4
  Page Setup
  Formatting Headers & Footers
  Protecting your Worksheet
  Multilingual Support  V4
  XML Import

HotCell Technology  V4
  What is HotCell Technology?
  Upload Example
  Advanced POST Example
  Advanced Upload Example

Programmer's Reference
  Object Model
      ExcelTemplate Object
      ExcelApplication Object
         3DProperties Object
         Area Object
         Axis Object
         Cells Object
         Cell Object
         Charts Object
         Chart Object
         ChartFrame Object
         Font Object
         Line Object
         PageSetup Object
         Pictures Object
         Picture Object
         Range Object
         SeriesCollection Object
         Series Object
         Style Object
         Worksheets Object
         Worksheet Object
  Formula Functions
  Formula Calculation Operators
  Formatting Codes
  Chart Codes

Installation
  Quick Installation
  Configuring IIS
  Security Considerations

External Links
  ExcelWriter Home Page
  Technical Support
  ExcelWriter Demos
  SoftArtisans Home Page
  E-mail General Questions
  E-mail Technical Support
  Legal Information

Reliable Download:
Solutions to Overcome Browser Inconsistencies

New in V4

*This feature is not available in
ExcelWriterSE, ExcelWriterLE,
and ExcelWriterFree.

Overview

ExcelWriter Version 4 features a solution to provide for a reliable download when using Internet Explorer v5.5 and above. Now, it's possible to perform downloads of ExcelWriter-generated workbooks without being subjected to the inconsistent, sometimes buggy behavior of the client's browser.

ASP-based file downloads, such as that of ExcelWriter's saOpenInPlace and saOpenInExcel options, have long been plagued by inconsistencies with client browsers. These problems stem from the browser's unreliable interpretation of the Content-Type and Content-Disposition HTTP response headers. Problems include unreliable open/save options on the client-side, incorrect name displayed in the SaveAs dialog, and multiple unwanted pop-up dialog boxes.

A reliable solution to these problems is to use a client-side object, instead of the browser itself, to perform the HTTP request to the server. We have provided a client-side HTTP client object called XLWAssistant that you can use to reliable retrieve ExcelWriter-generated workbooks from the server.

Top


Downloading with the XLWAssistant Object

The XLWAssistant object is a HTTP client that provides reliable file retrieval, saving, and opening capability. You can use the properties and methods of the object in client-side VBScript within Internet Explorer to handle your ExcelWriter downloads.

The following sample illustrates exactly how this works:

Run the Sample
Description See the Code
XLWAssistantDownload.asp Entry point to the sample. This page allows the client to download the XLWAssistant object by means of an <OBJECT> tag and a CAB. [View Source]
CXLWDownAssistant.vbs This script is included in the sample by means of an ASP <!-- #include --> directive. The XLWAssistant is wrapped by this VBScript class, whose properties and methods are used in XLWAssistantDownload.asp [View Source]
xlw.aspSimple ExcelWriter ASP script. Generates a simple Excel workbook and Response.BinaryWrite's it to the client. [View Source]

The sample works as follows:

  1. The XLWAssistantDownload.asp script loads and the client is offered to download XLWAssistant by means of an HTML <OBJECT> tag and a signed CAB (XLWAssis.cab), provided with ExcelWriter 4 Server edition. If the user has not already installed XLWAssistant, it will be installed automatically for them. This script then instantiates an instance of the VBScript class within CXLWDownloadAssistant.vbs and uses that class's properties and methods to perform a download depending on which button is pressed.
  2. XLWAssistant is a full-featured HTTP client. The VBScript class simply wraps the XLWAssistant object in order to provide a specialized solution for reliable ExcelWriter downloads. You can use the provided VBScript class, or develop your own solution.

Top


Reliable Download without XLWAssistant

The XLWAssistant object provides HTTP request and file saving capabilities. You can also realize this functionality by using a combination of Windows-specific objects. For example, you can use the MSXMLHTTP3 object for HTTP request, the ADODB.Stream object to write the HTTP response to the disk, and the WScript.Shell object to launch the file once downloaded.

The only difference in this sample is what is contained in the VBScript wrapper class. The previous sample used XLWAssistant within the class, while this one uses a combination of other objects to perform the same function. The properties and methods of the VBScript class are the same for both solutions.

You may want to use this solution if you do not want the client's to have to install the XLWAssistant DLL from a CAB. While this may be preferable in certain situations, there are serveral significant drawbacks to using this approach:

  • The client needs to have a combination of objects available on their systems. If one of the objects is not available or not installed, the solution will not function.
  • This solution uses the WScript.Shell object to obtain the TEMP folder for the client, and to launch the file after it is downloaded. The WScript.Shell is not marked safe for scripting, and the browser's security settings will need to be lowered in order to allow it to function. The XLWAssistant is marked safe for scripting, so browser security will not need to be lowered to the extent that WScript.Shell requires.

With these limitations in mind, it's important to mention that this sample is provided simple to illustrate how this functionality is available in many forms. Using the XLWAssistant object is recommended, but not necessary.

Run the Sample
Description See the Code
NoComponent.asp This is identical to the XLWAssistant solution, except there is no <OBJECT> tag. For this sample, we make the assumption that MSXMLHTTP3, ADODB.Stream, and WScript.Shell are installed and available on the client. [View Source]
CXLWDownload.vbs This is also the same as the XLWAssistant example, except that is uses different objects to perform the HTTP, file saving, and file launching. [View Source]
xlw.aspSimple ExcelWriter ASP script. Generates a simple Excel workbook and Response.BinaryWrite's it to the client. [View Source]

Top


Copyright © 2003, SoftArtisans, Inc.