Hello All,

Has anyone ever used the query2excel custom tag?  It's a nifty that it dumps
the results of a query into an Excel spreadsheet.  However, it's quite
erratic in its behavior, and I was wondering if anyone might be able to
help.

I'm running the simplest query in the world:

<cfquery name="findIngredients" datasource="dietary">
        SELECT 
                ProductName as col1,
                BrandName as col2,
                <!---a whole lot of other columns--->           
                OtherIngredients as col45
        FROM
                TblProduct
        WHERE
                Ingredient like '%#form.ingredient#%'
</cfquery>

When the whole thing is dumped to Excel, the order of columns just goes out
the window (I created the aliases COL1, COL2, etc. so I could keep track).
Not only do I get the column headers out of order, but the record values
themselves don't correspond to the appropriate column headers (I get the
product name under the quantity header, the price under the manufacturer's
address header... you get the picture).

I tried to get rid of some columns in the SELECT statement, since perhaps
there's a limit to the number of columns possible (and I am, after all,
selecting 45 of them).  The order there seems to display fine, as long as
the number of columns did not exceeds a certain number (which varied
anywhere between 10 and 16 on different attempts).  Anything above the
mystery number, I get inconsistent results...

Here's the order of output I got running 45 columns:
COL37,COL26,COL15,COL38,COL27,COL16,COL39,COL28,COL17,COL1,COL29,COL18,COL2,
COL19,COL3,COL4,COL5,COL6,COL7,COL40,COL8,COL41,COL30,COL9,COL42,COL31,COL20
,COL43,COL32,COL21,COL10,COL44,COL33,COL22,COL11,COL45,COL34,COL23,COL12,COL
35,COL24,COL13,COL36,COL25,COL14 
It seems to be doing something in decrements of 11, but not consistently
throughout... There's nothing about this in the documentation.

Couldn't find the tag author's contact info anywhere. 

Is there any way to "force" the colums to appear in the desired order? Is
there a way to ensure that values line up under the appropriate column
headers?

Many thanks,

............................
Yael Meroz
Information Delivery Systems
Research Triangle Institute
Tel: (919) 541-8021
Fax: (919) 541-6936
[EMAIL PROTECTED]
http://ids.rti.org

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to