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.
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.
<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.
<CFX_SS QUERY="DescriptorSearch" qColSeq="?colSeqList">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 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>
<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.
<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 DatabaseNote: Alternative qColSeq specifications that would give the same result include:
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
qColSeq="2, 1, 3"
qColSeq="2 1, 3"
qColSeq="2"
qColSeq="2 1"
March 2003
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.
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.
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.
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.)
...Sanders-Indev 2003