House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

query2excel

  << Previous Post |  RSS |  Tree View |  Sort Latest First |  Subscribe to this Group Next >> 

query2excel

Hi, i downloaded a cfx called query2excel and just wondering if either anyone Richard White 04/15/2008 09:41 AM
Sorry, I can't help you with this particular bug, but if you cannot Alan Rother 04/15/2008 11:42 AM
Does it work without the hashes (they are unnecessary)? i.e. Dominic Watson 04/15/2008 11:48 AM
thanks i will look into this as i do need more flexibility Richard White 04/15/2008 11:57 AM
hi dominic Richard White 04/15/2008 11:58 AM
Shouldn't that be maxRows="#finalQuery.recordcount# + 1" Dave Francis 04/15/2008 12:10 PM
If you copied that exactly...you have the +1 inside the pound signs... Eric Roberts 04/15/2008 12:19 PM
tanks dave tried that but also unsuccessful, i think i will have to use the Richard White 04/15/2008 12:56 PM
One last thing, then I'll shut up - have you tried taking the calculation Dave Francis 04/15/2008 01:25 PM
Have you tried putting the calculation in brackets first so that it   Daniel Kessler 04/15/2008 02:19 PM
hi dave, thanks yes i have tried this as well :( still no Richard White 04/15/2008 04:03 PM
Hi Daniel, just tried this to no success :( thanks though Richard White 04/15/2008 04:07 PM
GOT IT!!! Richard White 04/15/2008 04:13 PM
You have the "#" signs around the entire statement.  That will produce Eric Roberts 04/15/2008 08:01 PM
It looks like my postings aren't making it to the list again...your problem Eric Roberts 04/15/2008 08:04 PM
hi eric, i tried that as well but didnt work, same error was coming up Richard White 04/15/2008 08:09 PM
thanks eric, when i tried this is said '+' cannot be recognised - i even tried Richard White 04/15/2008 08:12 PM
FWIW -- you can do some calculations within pound signs -- something like Josh Nathanson 04/15/2008 08:18 PM

04/15/2008 09:41 AM
Author: Richard White Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303407 Hi, i downloaded a cfx called query2excel and just wondering if either anyone else has used it and has come up with the same error, or whether i am doing something fundamentally wrong in coldfusion to get the following error: the code i am using is as follows: <cfx_query2excel   query="finalQuery"   templateFile="#expandPath('.')#\template_query_results.xls"   outputFile="#expandPath('.')#\Excel_Downloads\#filePath#"         startRow=1   maxRows=#finalQuery.recordcount+1#   columnHeaderRow=1   appendOverwrites="true"> the error is on the maxrows attribute, it tells me that it must be numeric (maxRows=#finalQuery.recordcount+1#) however if i take out the +1 then it accepts it fine. i have even tried to setting variable to the recordcount + 1 then using that variable. it essentially works fine until i try to add 1 to it, no matter what way i try to add the 1. am i missing something simple or is there a bug with this cfx? thanks very much
04/15/2008 11:42 AM
Author: Alan Rother Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303431 Sorry, I can't help you with this particular bug, but if you cannot find a solution let me suggest using Ben Nadels POI CFC. it's an amazing interface into creating Excel files from darn near any CF object. http://www.bennadel.com/projects/poi-utility.htm http://www.bennadel.com/blog/469-Creating-Microsoft-Excel-Files-Using-ColdFusion-And-POI.htm It works amazingly well. =] -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org
04/15/2008 11:48 AM
Author: Dominic Watson Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303433 Does it work without the hashes (they are unnecessary)? i.e. maxRows=finalQuery.recordcount+1 OR maxRows="#finalQuery.recordcount+1#" Dominic -- Blog it up: http://fusion.dominicwatson.co.uk
04/15/2008 11:57 AM
Author: Richard White Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303435 thanks i will look into this as i do need more flexibility thanks
04/15/2008 11:58 AM
Author: Richard White Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303436 hi dominic its really strange as maxRows=#finalQuery.recordcount# works but maxRows=#finalQuery.recordcount+1# doesnt work i have also tried it both ways as you suggested below but it keeps saying maxrows must be numeric thanks ----- Excess quoted text cut - see Original Post for more -----
04/15/2008 12:10 PM
Author: Dave Francis Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303437 Shouldn't that be maxRows="#finalQuery.recordcount# + 1" Does it work without the hashes (they are unnecessary)? i.e. maxRows=finalQuery.recordcount+1 OR maxRows="#finalQuery.recordcount+1#" Dominic -- Blog it up: http://fusion.dominicwatson.co.uk
04/15/2008 12:19 PM
Author: Eric Roberts Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303439 If you copied that exactly...you have the +1 inside the pound signs... /*-----Original Message----- /* /*Sent: Tuesday, April 15, 2008 8:42 AM /*To: CF-Talk /*Subject: query2excel /* /*Hi, i downloaded a cfx called query2excel and just wondering if either /*anyone else has used it and has come up with the same error, or whether i /*am doing something fundamentally wrong in coldfusion to get the following /*error: /* /*the code i am using is as follows: /* /*<cfx_query2excel /*  query="finalQuery" /*  templateFile="#expandPath('.')#\template_query_results.xls" /*  outputFile="#expandPath('.')#\Excel_Downloads\#filePath#" /*        startRow=1 /*  maxRows=#finalQuery.recordcount+1# /*  columnHeaderRow=1 /*  appendOverwrites="true"> /* /*the error is on the maxrows attribute, it tells me that it must be numeric /*(maxRows=#finalQuery.recordcount+1#) however if i take out the +1 then it /*accepts it fine. /* /*i have even tried to setting variable to the recordcount + 1 then using /*that variable. it essentially works fine until i try to add 1 to it, no /*matter what way i try to add the 1. /* /*am i missing something simple or is there a bug with this cfx? /* /*thanks very much /* /* /* /*
04/15/2008 12:56 PM
Author: Richard White Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303440 tanks dave tried that but also unsuccessful, i think i will have to use the other component suggested here as this must be a bug in the cfx thanks ----- Excess quoted text cut - see Original Post for more -----
04/15/2008 01:25 PM
Author: Dave Francis Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303444 One last thing, then I'll shut up - have you tried taking the calculation outside? ie <cfset x = finalQuery.recordcount + 1> ... maxRows=x, (or maxRows="#x#") tanks dave tried that but also unsuccessful, i think i will have to use the other component suggested here as this must be a bug in the cfx thanks ----- Excess quoted text cut - see Original Post for more -----
04/15/2008 02:19 PM
Author: Daniel Kessler Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303446 Have you tried putting the calculation in brackets first so that it   calculates and then inserts the sum? maxRows=#(finalQuery.recordcount+1)# -- Daniel Kessler University of Maryland College Park School of Public Health 3302E HHP Building College Park, MD  20742-2611 Phone: 301-405-2545 http://sph.umd.edu
04/15/2008 04:03 PM
Author: Richard White Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303473 hi dave, thanks yes i have tried this as well :( still no joy
04/15/2008 04:07 PM
Author: Richard White Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303474 Hi Daniel, just tried this to no success :( thanks though ----- Excess quoted text cut - see Original Post for more -----
04/15/2008 04:13 PM
Author: Richard White Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303476 GOT IT!!! i managed to fool it seeing as the + 1 wasn't working i added an empty row into the query <cfset queryaddrow(finalQuery)> and it then had the same affect as finalQuery.recordcount+1 and it went through fine :) thanks for all your help and suggestions, this must be a bug in this component and i will def look at the other component suggested on here for enhanced flexibility thanks again
04/15/2008 08:01 PM
Author: Eric Roberts Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303527 You have the "#" signs around the entire statement.  That will produce an error as "(finalQuery.recordcount+1" does not exist as a variable.  Type maxRows=#finalQuery.recordcount#+1 Eric /*-----Original Message----- /* /*Sent: Tuesday, April 15, 2008 3:08 PM /*To: CF-Talk /*Subject: Re: query2excel /* /*Hi Daniel, just tried this to no success :( thanks though /* /* /* /*>Have you tried putting the calculation in brackets first so that it /*>calculates and then inserts the sum? /*> /*>maxRows=#(finalQuery.recordcount+1)# /*> /*> /*>-- /*> /*>Daniel Kessler /*> /*>University of Maryland College Park /*>School of Public Health /*>3302E HHP Building /*>College Park, MD  20742-2611 /*>Phone: 301-405-2545 /*>http://sph.umd.edu /* /*
04/15/2008 08:04 PM
Author: Eric Roberts Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303528 It looks like my postings aren't making it to the list again...your problem was that you had the +1 inside the # signs ie #query.recordcount+1# when it should be #query.recordcount#+1  The first is looking for a variable named "query.recordcount+1" that doesn't exist. Eric /*-----Original Message----- /* /*Sent: Tuesday, April 15, 2008 3:14 PM /*To: CF-Talk /*Subject: Re: query2excel /* /*GOT IT!!! /* /*i managed to fool it seeing as the + 1 wasn't working /* /*i added an empty row into the query <cfset queryaddrow(finalQuery)> /* /*and it then had the same affect as finalQuery.recordcount+1 and it went /*through fine :) /* /*thanks for all your help and suggestions, this must be a bug in this /*component and i will def look at the other component suggested on here for /*enhanced flexibility /* /*thanks again /* /*
04/15/2008 08:09 PM
Author: Richard White Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303530 hi eric, i tried that as well but didnt work, same error was coming up ----- Excess quoted text cut - see Original Post for more -----
04/15/2008 08:12 PM
Author: Richard White Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303531 thanks eric, when i tried this is said '+' cannot be recognised - i even tried putting it as you say but inside quotes, and also tried a val function wrapped around. just seemed that no combination worked with it ----- Excess quoted text cut - see Original Post for more -----
04/15/2008 08:18 PM
Author: Josh Nathanson Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56033#303533 FWIW -- you can do some calculations within pound signs -- something like #myquery.recordcount+1# should work I think, as long as myquery exists as a query.  If the query doesn't exist it will error of course.  So, it's possible that the OP's actual problem was that the query wasn't defined. <cfset myvar = 2> <cfoutput>#myvar + 1#</cfoutput> This will output 3. -- Josh ----- Excess quoted text cut - see Original Post for more -----
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

December 20, 2014

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31       

Designer, Developer and mobile workflow conference