A note about spam and forged e-mail: On several occasions, we have received spam that shows "sanders-indev.com" as the sending domain. Criminals easily forge anyone's e-mail address into the "From:" address of their spam, to hide their own identity. Our ISP and our domain hosting service have told us they can do nothing to stop it. The page at
stopspam.org confirms this, and shows why.
Sanders-Indev never sends e-mail that's not related to an ongoing transaction.

cfxss logo
Copyright (c) Sanders-Indev 1998, 2003. All rights reserved.

Although extraordinary care has been taken to ensure that CFXSS.DLL performs as described in this document, the user is solely responsible for any and all consequences of its use or misuse. In particular, Sanders-Indev can not be held liable for losses of any kind that may be directly or indirectly attributable to its use.

Quick Links
[Download Tutorial Example] [Download Installer] [Get Unlock Code]

CFXSS.DLL is dynamic-link library which, when installed as part of the Cold Fusion server engine, implements a new tag, <CFX_SS ... >. When a CFX_SS tag follows a CFQUERY tag on a page, it generates a spreadsheet-compatible file containing the results of the CFQUERY. A link on the page can permit the remote user to download the generated file from the server to a local file, which can be read by Excel (and most other spreadsheet applications) directly.

Version 2.4 of CFXSS.DLL adds an optional attribute (qColSeq) to specify which columns of the query are to appear in the spreadsheet; and their left-to-right column sequence in the spreadsheet. When attribute qColSeq is specified in a CFX_SS tag, the number of columns shown in the spreadsheet may be less than the number of columns generated by the query, and the spreadsheet's column sequence may be different from that of the query output.

In addition, version 2.4 adds the option to get an ordered list of the database columns returned by a named CFQUERY. This is useful when the ordinal numbers of the columns aren't readily apparent; for example, when a large number of columns is returned by the query. Note that the ColumnList property of a CFQUERY gives column names in an arbitrary sequence, so it cannot be used to determine correct ordinals for use in a qColSeq attribute.

CFXSS.DLL was developed using MSVC++5.0 and Cold Fusion4.0 on NT4.0(SP6a). There are no plans to write a Solaris version.

Installation:

  1. Download the installer, CFXSS.EXE.
  2. In the Control Panel/Services window, stop the Cold Fusion Application Server.
  3. Run CFXSS.EXE to install the software into an appropriate directory (like CFusion\bin).
  4. In the Control Panel/Services window, start the Cold Fusion Application Server.
  5. Open the Cold Fusion Administrator, and click the "Tags" button.
  6. Enter CFX_SS in "Tag name".
  7. Click "Add".
  8. Enter the directory you chose (Step 3 above) in "Server library (DLL)".
  9. Ensure that ProcessTagRequest is in "Procedure".
  10. Ensure that "Keep library loaded" is checked.
  11. Ensure that Writes query results to an Excel-compatible spreadsheet file. is in "Description".

Usage:

<CFX_SS QUERY="Name of CFQUERY"    
qColSeq ="Column-sequence ordinals, or name of variable to receive column names" fileName ="Name for output file (omit .xxx extension - .csv is assumed)" qNumRows ="Number of rows in result" qTitle ="Title for result sheet" qSubTitl ="Sub-title for result sheet" qDate ="Date results were saved" qTime ="Time results were saved" qLabel ="Label for selection expression" qLfOp ="Left operand of selection expression" qRelOp ="Relational operator of selection expression" qRtOp ="Right operand of selection expression" >

Note that the value of every attribute is a string.

The QUERY attribute is required. It must be given to specify the name of the CFQUERY that will provide data for the spreadsheet.

The qColSeq attribute is optional. It's used for limiting the query columns to be included in the spreadsheet, and/or specifying the sequence in which columns are to appear in the spreadsheet. It can also be used to get a string containing an ordered list of the names of the database columns that were returned by CFQUERY.
  <CFX_SS QUERY="DescriptorSearch" qColSeq="?colSeqList">
<CFSET colSeqArray=ListToArray(colSeqList)>
<CFSET ncols=colSeqArray[1]+1>
<B>Column Sequence:</b><BR>
<CFLOOP INDEX="i" FROM="2" TO=#ncols#>
<CFSET j=i-1>
<CFOUTPUT>[#j#: #colSeqArray[i]#] </cfoutput>
</CFLOOP>
The fileName attribute is required (unless the qColSeq attribute's value begins with a question mark; in which case, the fileName attribute, if present, is ignored.)
<CFSET tempVarPath="C:\InetPub\wwwroot\cfxs\cfxsTemp\">
<CFSET CSVfile="file://" & #tempVarPath# & "CFSS.csv">
<A HREF=<CFOUTPUT>#CSVfile#</CFOUTPUT>>Download spreadsheet file...</A>
The file extension .csv permits the file to be recognized as a native Excel file by MSExcel. The .csv extension is also recognized by many other applications as indicating a standard data format.

The remaining nine attributes are optional; they are used only for including information to describe the query.

Example:

  <CFX_SS QUERY="PriResSearch"
qColSeq ="2,1,3"
fileName =#tempVarPath# & "CFSS"
qNumRows =#PriResSearch.RecordCount#
qTitle ="Employee Reference Database"
qSubTitl ="Principal Residence Search"
qDate =#DateFormat(Now(),'yyyymmmdd')#
qTime =#TimeFormat(Now(),'HH:mm')#
qLabel ="RESULTS FOR:"
qLfOp =#form.LeftOperand#
qRelOp =#form.Operator#
qRtOp =#form.RightOperand#>

Assuming the CFQUERY named "PriResSearch" had produced three rows of data from columns named EMPNUM, DEPTNUM, and PRINCIPALRES, the above tag would generate a  file "CFSS.csv" (in the directory specified by #tempVarPath#), which MSExcel would display as follows:

  Employee Reference Database		
Principal Residence Search

RESULTS FOR: Principal Residence contains Chicago Saved 2003feb11 15:17
(3 rows)


DEPTNUM EMPNUM PRINCIPALRES
234567 b2050 Chicago Heights
345678 b2060 Chicago
123456 b2048 West Chicago

Note: Alternative qColSeq specifications that would give the same result include:
     qColSeq="2, 1, 3"
qColSeq="2 1, 3"
qColSeq="2"
qColSeq="2 1"

Note: Any version of CFX_SS found on MacroMedia's site is obsolete and should not be used for any purpose.

March 2003


Download Tutorial Example

Clicking this button will download a .zip archive containing a working example of how Version 2.4 of CFXSS.DLL can be used to arrange columns in a predetermined sequence across the spreadsheet, while excluding specified columns -- regardless of their relative positions as output by the CFQUERY tag.

[Back]

Example download...


Download Installer

CFXSS.DLL is downloaded in a self-extracting achive (CFXSS.EXE). It's a full-featured trial program that will run for 30 days after installation is completed.

CFXSS.EXE is about 64 kilobytes in size. When executed, it installs CFXSS.DLL in a user-chosen directory. An HTML file containing the above instructions will be put in the same directory.

The install program will also put an uninstall program, cfxssDELETE.exe, in the specified directory. It can be run at any time to uninstall CFXSS.DLL.

[Back]

CFXSS.EXE download...


Get Unlock Code

At any time after installing the trial copy, you can convert it to an unexpiring (registered) copy by re-running the cfxss.exe installation program and entering the associated "unlock code". We create an unlock code for you when we receive your license fee of $25 (USD).

To get the unlock code, enter your Product ID (shown each time you use the trial copy), then click the "Order Unlock Code" button below. This will present a secure page from our payment agent, PayPal, on which you can provide the data needed to complete the transaction.

When you've submitted the transaction, you'll get a confirmation page. Clicking its "Pay" button will cause PayPal instantly to notify both you and Sanders-Indev of the payment. After PayPal shows a page that acknowledges your payment, we'll show a page containing your unlock code. We'll also send the unlock code to you by e-mail.

[Back]
Product ID (shown when you use your trial copy)
Get Unlock Code


E-mail and Privacy

We at Sanders-Indev understand that your e-mail is a private facility. We know you pay all associated costs, including remote server space, transmission bandwidth, local storage, sorting, filtering, and manual e-mail processing. We won't shift our advertising costs to you by using your private e-mail to avoid the expense of the public postal service.

We honor your right to be left in peace and privacy, by using information you send to us only for processing open transactions and necessary business accounting. While most companies assure you that they only "share" your personal data with third parties "as permitted by law", Sanders-Indev doesn't try to slip that loophole language past you. We won't release information you entrust to us unless required by law.

(Although we have confidence in the policies of our payment agent, the preceding statements are our own, not theirs.)

[Back]

...Sanders-Indev 2003