Re: CF - data excel
use Ben Nadel POI Utility (http://www.bennadel.com/projects/poi-utility.htm) direct from a query or, just use cfcontent type=application/vnd.ms-excel With a Table 2010/7/28 cfcom cf...@aceligent.com I need to export to excel. Will be provided only html pages that are not from cf server. Is there a way to set up an import feature to regrab the html data (name, company, address, etc fields) back into CF so it can be easily exported to excel? Thank you ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335826 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF - data excel
Sorry I didnt read it right you have to receive the HTML data in a CFPage maybe you can use a CFHTTP to call this page, and the content you output in a XLS File. But you have always to call a CFPage to Process! Em 28 de julho de 2010 17h37min27s UTC-3, Rox Designer roberto...@gmail.com escreveu: use Ben Nadel POI Utility ( http://www.bennadel.com/projects/poi-utility.htm) direct from a query or, just use cfcontent type=application/vnd.ms-excel With a Table 2010/7/28 cfcom cf...@aceligent.com I need to export to excel. Will be provided only html pages that are not from cf server. Is there a way to set up an import feature to regrab the html data (name, company, address, etc fields) back into CF so it can be easily exported to excel? Thank you ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335827 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Format Tables (Was RE: CF to excel)
Can you show us the looping code? It's probably an error in reusing too much of the sample code --- Janine Jakim [EMAIL PROTECTED] wrote: Thanks for all the input. Now for the next question. I am having a hard time formatting my html table correctly. I am using TRTH#Skill[1]#/TH TH#Skill[2]#/TH in the heading (I have also tried making it just a regular TRTD/TD/TR. But unfortunately it is giving each student a heading. ie: Reading MathSpelling JSmith A A A Reading MathSpelling SJones B B B So I have 2 questions: 1. Is there a way to get the heading to be for the whole page when I am using a variable? 2. Is there a way to make the #skill[1]# #Skill[2]#, etc. expand/constrict accordingly. (ie: 5th grade Math has 3 skills/ reading has 16 skills whereas 1st grade math has 21 skills and 19 reading skills) I don't want to have to make a different page for each subject/grade. If I just put #Skill# in the header it only gives me the 1st skill... Any ideas??? -Original Message- From: John Anderson [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2001 4:00 PM To: CF-Talk Subject: RE: CF to excel You can create an html table and output that is an excel file as follows: CFSETTING ENABLECFOUTPUTONLY=YES cfif parameterexists(EmpName) cfinclude template=qry_employees.cfm cfif qry_employees.recordcount gt 0 cfset excelstring=table border=1trtdbFirst Name/b/td cfset excelstring=excelstring tdbLast Name/b/td cfset excelstring=excelstring tdbOffice Phone/b/td cfset excelstring=excelstring tdbMobile Phone/b/td cfset excelstring=excelstring tdbPager/b/td/tr cfoutput query=qry_employees cfset excelstring=excelstring tr td#empfirstname#/tdtd#emplastname#/tdtd#officep#/tdtd#ce ll#/tdtd#pager#/td/tr /cfoutput cfset excelstring=excelstring /table /cfif /cfif CFHEADER NAME=Content-Disposition VALUE=inline; filename=download.xls cfcontent type=application/vnd.ms-excel cfoutput#excelstring#/cfoutput CFSETTING ENABLECFOUTPUTONLY=No This output string that you have built will come across as an excel file. The key is in the cfcontent tag and cfheader tag. John Anderson aloha-webdesign.com -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED] Sent: Monday, September 17, 2001 12:40 PM To: CF-Talk Subject: CF to excel How flexible is the process of generating excel files? I need to have an output that is dynamic for the columns and rows. For example: #student# #student# #student# #student# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# Translating into: JohnSmith JanSmithSamJonessandyJones Reading C A A B MathB A B A English B B A C My tables are normalized. There are many tables that make this info. 1. One reference table that lists all the skills. 2. One table that shows student information. 3. One table that lists the studentID/skillID/Grade (hooks the student info with the skills reference table). 4. One reference table that lists the quarter and dates of the quarter so only the current quarter prints out. Is this possible? What are the steps to making it so? Do I need to make the information into an array(s) first? I've read the how to from Ben's CF5 book and the tutorial from cfcomet.com- but of course I want to make things more difficult. Thanks in advance. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305565 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF to excel
without the cfheader tags is the page loaind in the broiwser properly? Adam H On Mon, 14 Mar 2005 21:47:16 -0600, Eric Creese [EMAIL PROTECTED] wrote: Okay I tried your suggestion and got the same error The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. -- HTTP 500 - Internal server error Internet Explorer - Original Message - From: Dawson, Michael [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, March 14, 2005 9:32 PM Subject: RE: CF to excel I use this with success: cfheader name=Content-Disposition value=attachment; filename=#fileName# cfcontent type=Application/Unknown reset=yes [html content goes here...] This code snippet should prompt you to download/save each spreadsheet w/o opening Excel directly. M!ke -Original Message- From: Eric Creese [mailto:[EMAIL PROTECTED] Sent: Monday, March 14, 2005 9:22 PM To: CF-Talk Subject: CF to excel How come the following will not work. I get a 500 error html head titleCLASS of cfoutput#getYRInfo.class_year#/cfoutput Spread Sheet/title /head body cfcontent type=application/ms-excel CFHEADER NAME=content-disposition VALUE=filename=classroster.xls cfoutputtable cols=11/cfoutput cfoutput query=getclass tr td strong#fname#/strong/td td strong#lname#/strong/td td strong#mname#/strong/td td strong#addr1#/strong/td td strong#addr2#/strong/td td strong#city#/strong/td td strong#state#/strong/td td strong#country#/strong/td td strong#zip#/strong/td td strong#email#/strong/td tdstrong#phone#/strong/td /tr /cfoutput cfoutput/table/cfoutput /body /html ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198788 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CF to excel
How about removing the reset=yes? -Original Message- From: Adam Haskell [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 6:57 AM To: CF-Talk Subject: Re: CF to excel without the cfheader tags is the page loaind in the broiwser properly? Adam H On Mon, 14 Mar 2005 21:47:16 -0600, Eric Creese [EMAIL PROTECTED] wrote: Okay I tried your suggestion and got the same error The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. -- HTTP 500 - Internal server error Internet Explorer - Original Message - From: Dawson, Michael [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, March 14, 2005 9:32 PM Subject: RE: CF to excel I use this with success: cfheader name=Content-Disposition value=attachment; filename=#fileName# cfcontent type=Application/Unknown reset=yes [html content goes here...] This code snippet should prompt you to download/save each spreadsheet w/o opening Excel directly. M!ke -Original Message- From: Eric Creese [mailto:[EMAIL PROTECTED] Sent: Monday, March 14, 2005 9:22 PM To: CF-Talk Subject: CF to excel How come the following will not work. I get a 500 error html head titleCLASS of cfoutput#getYRInfo.class_year#/cfoutput Spread Sheet/title /head body cfcontent type=application/ms-excel CFHEADER NAME=content-disposition VALUE=filename=classroster.xls cfoutputtable cols=11/cfoutput cfoutput query=getclass tr td strong#fname#/strong/td td strong#lname#/strong/td td strong#mname#/strong/td td strong#addr1#/strong/td td strong#addr2#/strong/td td strong#city#/strong/td td strong#state#/strong/td td strong#country#/strong/td td strong#zip#/strong/td td strong#email#/strong/td tdstrong#phone#/strong/td /tr /cfoutput cfoutput/table/cfoutput /body /html ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198790 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CF to excel
Good question. If the page is not well-formed enough for Excel to work, it may have errors when running the page only in the browser. Also, make sure you are not just refreshing the actual page with the excel data in it. You will need to click on a link, or submit a form, that eventually calls the page. Refreshes can generate errors when sending non-HTML data through the response. M!ke -Original Message- From: Adam Haskell [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:57 AM To: CF-Talk Subject: Re: CF to excel without the cfheader tags is the page loaind in the broiwser properly? Adam H ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198799 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CF to excel
One possibility amongst others is that cfcontent is disabled in the administrator. The first thing to do is to get the actual error message from coldfusion as well as the error code (HTTP 500 = something went wrong - a little more info might come in handy). Check the error log file for that. Also, it looks like you have so called friendly HTTP errors on in IE - don't do that. Go to Tools - Internet Options... - Advanced - Browsing (in IE) and make sure the Show friendly HTTP error messages checkbox is unchecked. Or maybe you are using a site wide error handler? /t -Original Message- From: Eric Creese [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 4:47 AM To: CF-Talk Subject: Re: CF to excel Okay I tried your suggestion and got the same error The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. --- --- HTTP 500 - Internal server error Internet Explorer - Original Message - From: Dawson, Michael [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, March 14, 2005 9:32 PM Subject: RE: CF to excel I use this with success: cfheader name=Content-Disposition value=attachment; filename=#fileName# cfcontent type=Application/Unknown reset=yes [html content goes here...] This code snippet should prompt you to download/save each spreadsheet w/o opening Excel directly. M!ke -Original Message- From: Eric Creese [mailto:[EMAIL PROTECTED] Sent: Monday, March 14, 2005 9:22 PM To: CF-Talk Subject: CF to excel How come the following will not work. I get a 500 error html head titleCLASS of cfoutput#getYRInfo.class_year#/cfoutput Spread Sheet/title /head body cfcontent type=application/ms-excel CFHEADER NAME=content-disposition VALUE=filename=classroster.xls cfoutputtable cols=11/cfoutput cfoutput query=getclass tr td strong#fname#/strong/td td strong#lname#/strong/td td strong#mname#/strong/td td strong#addr1#/strong/td td strong#addr2#/strong/td td strong#city#/strong/td td strong#state#/strong/td td strong#country#/strong/td td strong#zip#/strong/td td strong#email#/strong/td tdstrong#phone#/strong/td /tr /cfoutput cfoutput/table/cfoutput /body /html ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198833 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CF to excel
I use this with success: cfheader name=Content-Disposition value=attachment; filename=#fileName# cfcontent type=Application/Unknown reset=yes [html content goes here...] This code snippet should prompt you to download/save each spreadsheet w/o opening Excel directly. M!ke -Original Message- From: Eric Creese [mailto:[EMAIL PROTECTED] Sent: Monday, March 14, 2005 9:22 PM To: CF-Talk Subject: CF to excel How come the following will not work. I get a 500 error html head titleCLASS of cfoutput#getYRInfo.class_year#/cfoutput Spread Sheet/title /head body cfcontent type=application/ms-excel CFHEADER NAME=content-disposition VALUE=filename=classroster.xls cfoutputtable cols=11/cfoutput cfoutput query=getclass tr td strong#fname#/strong/td td strong#lname#/strong/td td strong#mname#/strong/td td strong#addr1#/strong/td td strong#addr2#/strong/td td strong#city#/strong/td td strong#state#/strong/td td strong#country#/strong/td td strong#zip#/strong/td td strong#email#/strong/td tdstrong#phone#/strong/td /tr /cfoutput cfoutput/table/cfoutput /body /html ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198766 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CF to excel
Okay I tried your suggestion and got the same error The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. -- HTTP 500 - Internal server error Internet Explorer - Original Message - From: Dawson, Michael [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, March 14, 2005 9:32 PM Subject: RE: CF to excel I use this with success: cfheader name=Content-Disposition value=attachment; filename=#fileName# cfcontent type=Application/Unknown reset=yes [html content goes here...] This code snippet should prompt you to download/save each spreadsheet w/o opening Excel directly. M!ke -Original Message- From: Eric Creese [mailto:[EMAIL PROTECTED] Sent: Monday, March 14, 2005 9:22 PM To: CF-Talk Subject: CF to excel How come the following will not work. I get a 500 error html head titleCLASS of cfoutput#getYRInfo.class_year#/cfoutput Spread Sheet/title /head body cfcontent type=application/ms-excel CFHEADER NAME=content-disposition VALUE=filename=classroster.xls cfoutputtable cols=11/cfoutput cfoutput query=getclass tr td strong#fname#/strong/td td strong#lname#/strong/td td strong#mname#/strong/td td strong#addr1#/strong/td td strong#addr2#/strong/td td strong#city#/strong/td td strong#state#/strong/td td strong#country#/strong/td td strong#zip#/strong/td td strong#email#/strong/td tdstrong#phone#/strong/td /tr /cfoutput cfoutput/table/cfoutput /body /html ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198767 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: cf and excel - freeze panes
At 12:19 PM 12/16/2002, you wrote: When creating an excel spreadsheet with coldfusion, is there a way to create what 'freeze panes' in excel does to lock the headers? thanks, seth It's a part of the workbook's Windows property, in VBA you can access it like this: ThisWorkbook.Windows(1).FreezePanes which is boolean. You can set it to true to freeze panes. I'm not sure how to specify where to freeze them, but I'm sure you can figure it out with a little experimentation. HTH, Sam ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
Re: CF to excel formatting questions
At 11:13 AM 22/10/02 -0400, Janine Jakim wrote: I'm using the basic call to excel (as explained by BF in his book) because I do know that all my users have excel. My questions: 1. Can you add an excel toolbar- I want the users to be able to sort the information on any of the columns. 2. Is there any way to get it so that the headings can wrap. Some of my headings are long so instead of making a long stretchy heading. Thanks in advance for any help. I did my CF to Excel functionality by using webqueries. They work well, and since the data is in Excel, one can use all of Excel's functions/formatting on it. T ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: CF to excel formatting questions
Thane What exactly are web queries? Thanks Kola -Original Message- From: Thane Sherrington [mailto:tsherr;auracom.com] Sent: 22 October 2002 16:24 To: CF-Talk Subject: Re: CF to excel formatting questions At 11:13 AM 22/10/02 -0400, Janine Jakim wrote: I'm using the basic call to excel (as explained by BF in his book) because I do know that all my users have excel. My questions: 1. Can you add an excel toolbar- I want the users to be able to sort the information on any of the columns. 2. Is there any way to get it so that the headings can wrap. Some of my headings are long so instead of making a long stretchy heading. Thanks in advance for any help. I did my CF to Excel functionality by using webqueries. They work well, and since the data is in Excel, one can use all of Excel's functions/formatting on it. T ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: CF to excel formatting questions
At 05:25 PM 10/22/02 +0100, Kola Oyedeji wrote: Thane What exactly are web queries? A web query is created in Excel and allow Excel to read and import data from a webpage. E-mail me offlist if you want more info. T ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: CF to excel formatting questions
If all of your users have Excel, then you might look into using the Microsoft Office web components. Web components allow you to embed an activeX excel control on a web page -- inheriting the basic Excel functionality. It's really the ultimate CFGRID replacement. Information can be passed to the control as XML. Regards, Steve Drucker CEO Fig Leaf Software www.figleaf.com -Original Message- From: Janine Jakim [mailto:jjakim;albemarle.org] Sent: Tuesday, October 22, 2002 11:14 AM To: CF-Talk Subject: CF to excel formatting questions I'm using the basic call to excel (as explained by BF in his book) because I do know that all my users have excel. My questions: 1. Can you add an excel toolbar- I want the users to be able to sort the information on any of the columns. 2. Is there any way to get it so that the headings can wrap. Some of my headings are long so instead of making a long stretchy heading. Thanks in advance for any help. J ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: CF to excel formatting questions
Is it just me or does CFGRID actually suck? I just did a search on google for Microsoft Office web components, the results are scary. http://www.google.ca/search?hl=enie=UTF-8oe=UTF-8q=%22Microsoft+Office+we b+components%22meta= -Brook At 02:07 PM 22/10/02 -0400, you wrote: If all of your users have Excel, then you might look into using the Microsoft Office web components. Web components allow you to embed an activeX excel control on a web page -- inheriting the basic Excel functionality. It's really the ultimate CFGRID replacement. Information can be passed to the control as XML. Regards, Steve Drucker CEO Fig Leaf Software www.figleaf.com -Original Message- From: Janine Jakim [mailto:jjakim;albemarle.org] Sent: Tuesday, October 22, 2002 11:14 AM To: CF-Talk Subject: CF to excel formatting questions I'm using the basic call to excel (as explained by BF in his book) because I do know that all my users have excel. My questions: 1. Can you add an excel toolbar- I want the users to be able to sort the information on any of the columns. 2. Is there any way to get it so that the headings can wrap. Some of my headings are long so instead of making a long stretchy heading. Thanks in advance for any help. J ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: CF to excel formatting questions
;font-family:Arial;font-size:8.0pt'See the a href=http://office.microsoft.com/office/redirect/10/MSOWCPub.asp?HelpLCID=1 033Microsoft Office Web site/a for more information./p /object/div /body /html -Original Message- From: Brook Davies [mailto:brook;maracasmedia.com] Sent: Tuesday, October 22, 2002 2:26 PM To: CF-Talk Subject: RE: CF to excel formatting questions Is it just me or does CFGRID actually suck? I just did a search on google for Microsoft Office web components, the results are scary. http://www.google.ca/search?hl=enie=UTF-8oe=UTF- 8q=%22Microsoft+Office+we b+components%22meta= -Brook At 02:07 PM 22/10/02 -0400, you wrote: If all of your users have Excel, then you might look into using the Microsoft Office web components. Web components allow you to embed an activeX excel control on a web page -- inheriting the basic Excel functionality. It's really the ultimate CFGRID replacement. Information can be passed to the control as XML. Regards, Steve Drucker CEO Fig Leaf Software www.figleaf.com -Original Message- From: Janine Jakim [mailto:jjakim;albemarle.org] Sent: Tuesday, October 22, 2002 11:14 AM To: CF-Talk Subject: CF to excel formatting questions I'm using the basic call to excel (as explained by BF in his book) because I do know that all my users have excel. My questions: 1. Can you add an excel toolbar- I want the users to be able to sort the information on any of the columns. 2. Is there any way to get it so that the headings can wrap. Some of my headings are long so instead of making a long stretchy heading. Thanks in advance for any help. J ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
Re: cf to excel formatting problem
If you open the file directly into excel, this happens. (I deal with a lot of UPC's with leading zeros). However, if you open excel, then import text file, you have the opportunity to tell it how to treat each column (selecting text for your zip column) and everything is then cool. All else fails, I put a single quote in front of the number. That's Excel's internal notation that something is text and sometimes it works, sometimes it leaves the quote there. I haven't figured out why. I am exporting some data to Excel and one of the fields is zip code. Excel is stripping all leading 0's (zeros) off of the zip codes. I need it to leave the zip code alone, i.e. treat it as text instead of a number. Any ideas anyone? So far, I have tried: 1) Using an obscure ASCII char in front of the zip. RESULT: Excel puts in a box when it encounters an ASCII char it does not understand 2) Enclosing the zip in both single quotes and double quotes. RESULT: Excel leaves the quotes in instead of treating them as a text qualifier 3) Looked at the Allaire forums, where I saw the same question asked but not answered. 4) Read up on Excel at cfcomet, but most things there are a little overkill for what I am trying to do. TIA, Nate = Nathan Shaw Senior Web Applications Developer iaffect, Inc. http://www.iaffectonline.com ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: cf to excel formatting problem
thinking aloud. 1) export / import as a text field 2) single quote at the front of the field How are you importing / exporting? Eric Dawson From: Nathan Shaw [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: cf to excel formatting problem Date: Mon, 29 Oct 2001 10:48:29 -0800 (PST) I am exporting some data to Excel and one of the fields is zip code. Excel is stripping all leading 0's (zeros) off of the zip codes. I need it to leave the zip code alone, i.e. treat it as text instead of a number. Any ideas anyone? So far, I have tried: 1) Using an obscure ASCII char in front of the zip. RESULT: Excel puts in a box when it encounters an ASCII char it does not understand 2) Enclosing the zip in both single quotes and double quotes. RESULT: Excel leaves the quotes in instead of treating them as a text qualifier 3) Looked at the Allaire forums, where I saw the same question asked but not answered. 4) Read up on Excel at cfcomet, but most things there are a little overkill for what I am trying to do. TIA, Nate = Nathan Shaw Senior Web Applications Developer iaffect, Inc. http://www.iaffectonline.com ~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF and Excel
www.cfcomet.com has some really good examples of using Excel as a datasource. -Original Message- From: Eric Dawson [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 21, 2001 1:19 PM To: CF-Talk Subject: Re: CF and Excel fairly low tech approach but I have set up an access database that links to an excel spreadsheet that can be freely uploaded by site administrator. The access database has the DSN mapping. I use it so he can upload many new records at once, and is used as part of an import process. Eric Dawson From: Scott Mulholland [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: CF and Excel Date: Wed, 17 Oct 2001 17:18:40 -0400 Is there a way to read in an Excel worksheet into a cf app, possibly through com, without using excel as the datasource? Thanks, Scott ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CF and Excel
fairly low tech approach but I have set up an access database that links to an excel spreadsheet that can be freely uploaded by site administrator. The access database has the DSN mapping. I use it so he can upload many new records at once, and is used as part of an import process. Eric Dawson From: Scott Mulholland [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: CF and Excel Date: Wed, 17 Oct 2001 17:18:40 -0400 Is there a way to read in an Excel worksheet into a cf app, possibly through com, without using excel as the datasource? Thanks, Scott ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF and Excel
Have you looked here? http://www.cfcomet.com EC -Original Message- From: Scott Mulholland [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 17, 2001 5:19 PM To: CF-Talk Subject: CF and Excel Is there a way to read in an Excel worksheet into a cf app, possibly through com, without using excel as the datasource? Thanks, Scott ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: cf to excel display issue
Hi Janine, If you're using oracle, there's a great way around this (and I'd assume sql server has something similar). Use the nvl function in your query like so: SELECTnvl(columnname, 0) FROM yourtable. nvl basically replaces nulls with something else. The only caveat is that the replacement must be of the same datatype as the original column. So, if you don't want zeros to show up for a number column, you'd have to do a replace in your cfoutput to replace the zeros with null or something similar. Hope that helps. -Deanna Deanna Schneider Interactive Media Developer [EMAIL PROTECTED] ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CF to excel
Believe it or not -- Windows 98 and higher has an Import to Excel function. Just right mouse click on the coldfusion table you want to turn into Excel, and a menu comes up saying Import to Excel. It is NOT in Windows 95 though. Julia Computer Consulting Web Design @ Reasonable Prices PO Box 279 Watertown MA 02471-0279 Email: [EMAIL PROTECTED] http://www.juliagreen.com Phone: 617-926-3413 Fax: 617-812-5935 - Original Message - From: Janine Jakim [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Monday, September 17, 2001 3:39 PM Subject: CF to excel How flexible is the process of generating excel files? I need to have an output that is dynamic for the columns and rows. For example: #student# #student# #student# #student# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# Translating into: JohnSmith JanSmith SamJones sandyJones Reading CAAB Math BABA English BBAC My tables are normalized. There are many tables that make this info. 1. One reference table that lists all the skills. 2. One table that shows student information. 3. One table that lists the studentID/skillID/Grade (hooks the student info with the skills reference table). 4. One reference table that lists the quarter and dates of the quarter so only the current quarter prints out. Is this possible? What are the steps to making it so? Do I need to make the information into an array(s) first? I've read the how to from Ben's CF5 book and the tutorial from cfcomet.com- but of course I want to make things more difficult. Thanks in advance. ~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Format Tables (Was RE: CF to excel)
Thanks for all the input. Now for the next question. I am having a hard time formatting my html table correctly. I am using TRTH#Skill[1]#/TH TH#Skill[2]#/TH in the heading (I have also tried making it just a regular TRTD/TD/TR. But unfortunately it is giving each student a heading. ie: Reading MathSpelling JSmith A A A Reading MathSpelling SJones B B B So I have 2 questions: 1. Is there a way to get the heading to be for the whole page when I am using a variable? 2. Is there a way to make the #skill[1]# #Skill[2]#, etc. expand/constrict accordingly. (ie: 5th grade Math has 3 skills/ reading has 16 skills whereas 1st grade math has 21 skills and 19 reading skills) I don't want to have to make a different page for each subject/grade. If I just put #Skill# in the header it only gives me the 1st skill... Any ideas??? -Original Message- From: John Anderson [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 4:00 PM To: CF-Talk Subject: RE: CF to excel You can create an html table and output that is an excel file as follows: CFSETTING ENABLECFOUTPUTONLY=YES cfif parameterexists(EmpName) cfinclude template=qry_employees.cfm cfif qry_employees.recordcount gt 0 cfset excelstring=table border=1trtdbFirst Name/b/td cfset excelstring=excelstring tdbLast Name/b/td cfset excelstring=excelstring tdbOffice Phone/b/td cfset excelstring=excelstring tdbMobile Phone/b/td cfset excelstring=excelstring tdbPager/b/td/tr cfoutput query=qry_employees cfset excelstring=excelstring trtd#empfirstname#/tdtd#emplastname#/tdtd#officep#/tdtd#ce ll#/tdtd#pager#/td/tr /cfoutput cfset excelstring=excelstring /table /cfif /cfif CFHEADER NAME=Content-Disposition VALUE=inline; filename=download.xls cfcontent type=application/vnd.ms-excel cfoutput#excelstring#/cfoutput CFSETTING ENABLECFOUTPUTONLY=No This output string that you have built will come across as an excel file. The key is in the cfcontent tag and cfheader tag. John Anderson aloha-webdesign.com -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 12:40 PM To: CF-Talk Subject: CF to excel How flexible is the process of generating excel files? I need to have an output that is dynamic for the columns and rows. For example: #student# #student# #student# #student# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# Translating into: JohnSmith JanSmithSamJonessandyJones Reading C A A B MathB A B A English B B A C My tables are normalized. There are many tables that make this info. 1. One reference table that lists all the skills. 2. One table that shows student information. 3. One table that lists the studentID/skillID/Grade (hooks the student info with the skills reference table). 4. One reference table that lists the quarter and dates of the quarter so only the current quarter prints out. Is this possible? What are the steps to making it so? Do I need to make the information into an array(s) first? I've read the how to from Ben's CF5 book and the tutorial from cfcomet.com- but of course I want to make things more difficult. Thanks in advance. ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Format Tables (Was RE: CF to excel)
Try this: TABLE TR THnbsp;/THTHSkill1/THTHSkill2/THTHSkill3/TH /TR CFLOOP QUERY = #YourQuery# TR TD#StudentName#/TDTD#ReadingScore#/TDTD#MathScore#/TDTDSpellin gScore#/TD /TR /CFLOOP /TABLE This should get you started toward what you want. I don;t have time to right the whole page layout right now, but I hope that this will help you in the right direction. Larry Juncker Senior Cold Fusion Developer Heartland Communications Group, Inc. [EMAIL PROTECTED] -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 9:01 AM To: CF-Talk Subject: Format Tables (Was RE: CF to excel) Thanks for all the input. Now for the next question. I am having a hard time formatting my html table correctly. I am using TRTH#Skill[1]#/TH TH#Skill[2]#/TH in the heading (I have also tried making it just a regular TRTD/TD/TR. But unfortunately it is giving each student a heading. ie: Reading MathSpelling JSmith A A A Reading MathSpelling SJones B B B So I have 2 questions: 1. Is there a way to get the heading to be for the whole page when I am using a variable? 2. Is there a way to make the #skill[1]# #Skill[2]#, etc. expand/constrict accordingly. (ie: 5th grade Math has 3 skills/ reading has 16 skills whereas 1st grade math has 21 skills and 19 reading skills) I don't want to have to make a different page for each subject/grade. If I just put #Skill# in the header it only gives me the 1st skill... Any ideas??? -Original Message- From: John Anderson [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 4:00 PM To: CF-Talk Subject: RE: CF to excel You can create an html table and output that is an excel file as follows: CFSETTING ENABLECFOUTPUTONLY=YES cfif parameterexists(EmpName) cfinclude template=qry_employees.cfm cfif qry_employees.recordcount gt 0 cfset excelstring=table border=1trtdbFirst Name/b/td cfset excelstring=excelstring tdbLast Name/b/td cfset excelstring=excelstring tdbOffice Phone/b/td cfset excelstring=excelstring tdbMobile Phone/b/td cfset excelstring=excelstring tdbPager/b/td/tr cfoutput query=qry_employees cfset excelstring=excelstring trtd#empfirstname#/tdtd#emplastname#/tdtd#officep#/tdtd#ce ll#/tdtd#pager#/td/tr /cfoutput cfset excelstring=excelstring /table /cfif /cfif CFHEADER NAME=Content-Disposition VALUE=inline; filename=download.xls cfcontent type=application/vnd.ms-excel cfoutput#excelstring#/cfoutput CFSETTING ENABLECFOUTPUTONLY=No This output string that you have built will come across as an excel file. The key is in the cfcontent tag and cfheader tag. John Anderson aloha-webdesign.com -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 12:40 PM To: CF-Talk Subject: CF to excel How flexible is the process of generating excel files? I need to have an output that is dynamic for the columns and rows. For example: #student# #student# #student# #student# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# Translating into: JohnSmith JanSmithSamJonessandyJones Reading C A A B MathB A B A English B B A C My tables are normalized. There are many tables that make this info. 1. One reference table that lists all the skills. 2. One table that shows student information. 3. One table that lists the studentID/skillID/Grade (hooks the student info with the skills reference table). 4. One reference table that lists the quarter and dates of the quarter so only the current quarter prints out. Is this possible? What are the steps to making it so? Do I need to make the information into an array(s) first? I've read the how to from Ben's CF5 book and the tutorial from cfcomet.com- but of course I want to make things more difficult. Thanks in advance. ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: Format Tables (Was RE: CF to excel)
Can you show us the looping code? It's probably an error in reusing too much of the sample code --- Janine Jakim [EMAIL PROTECTED] wrote: Thanks for all the input. Now for the next question. I am having a hard time formatting my html table correctly. I am using TRTH#Skill[1]#/TH TH#Skill[2]#/TH in the heading (I have also tried making it just a regular TRTD/TD/TR. But unfortunately it is giving each student a heading. ie: Reading MathSpelling JSmithA A A Reading MathSpelling SJonesB B B So I have 2 questions: 1. Is there a way to get the heading to be for the whole page when I am using a variable? 2. Is there a way to make the #skill[1]# #Skill[2]#, etc. expand/constrict accordingly. (ie: 5th grade Math has 3 skills/ reading has 16 skills whereas 1st grade math has 21 skills and 19 reading skills) I don't want to have to make a different page for each subject/grade. If I just put #Skill# in the header it only gives me the 1st skill... Any ideas??? -Original Message- From: John Anderson [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 4:00 PM To: CF-Talk Subject: RE: CF to excel You can create an html table and output that is an excel file as follows: CFSETTING ENABLECFOUTPUTONLY=YES cfif parameterexists(EmpName) cfinclude template=qry_employees.cfm cfif qry_employees.recordcount gt 0 cfset excelstring=table border=1trtdbFirst Name/b/td cfset excelstring=excelstring tdbLast Name/b/td cfset excelstring=excelstring tdbOffice Phone/b/td cfset excelstring=excelstring tdbMobile Phone/b/td cfset excelstring=excelstring tdbPager/b/td/tr cfoutput query=qry_employees cfset excelstring=excelstring trtd#empfirstname#/tdtd#emplastname#/tdtd#officep#/tdtd#ce ll#/tdtd#pager#/td/tr /cfoutput cfset excelstring=excelstring /table /cfif /cfif CFHEADER NAME=Content-Disposition VALUE=inline; filename=download.xls cfcontent type=application/vnd.ms-excel cfoutput#excelstring#/cfoutput CFSETTING ENABLECFOUTPUTONLY=No This output string that you have built will come across as an excel file. The key is in the cfcontent tag and cfheader tag. John Anderson aloha-webdesign.com -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 12:40 PM To: CF-Talk Subject: CF to excel How flexible is the process of generating excel files? I need to have an output that is dynamic for the columns and rows. For example: #student# #student# #student# #student# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# Translating into: JohnSmith JanSmithSamJonessandyJones Reading C A A B Math B A B A English B B A C My tables are normalized. There are many tables that make this info. 1. One reference table that lists all the skills. 2. One table that shows student information. 3. One table that lists the studentID/skillID/Grade (hooks the student info with the skills reference table). 4. One reference table that lists the quarter and dates of the quarter so only the current quarter prints out. Is this possible? What are the steps to making it so? Do I need to make the information into an array(s) first? I've read the how to from Ben's CF5 book and the tutorial from cfcomet.com- but of course I want to make things more difficult. Thanks in advance. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Format Tables (Was RE: CF to excel)
Ok I answered question 2. I found that using CFOUTPUTTH#Skill#/TH/CFOUTPUT will go through all the skills so that I don't need to do Skill1, Skill2, Skill3 Now I still have the issue of my headers showing up before each student. This is my code: Table CFOUTPUT query=SGradegroup=PERMNUM TR THnbsp;/THCFOUTPUTTH#Skill#/TH/CFOUTPUT /TR TR CFIF Val(SGrade.StudentID) TD#LASTNAME#, #FIRSTNAME# /TD/CFIF CFOUTPUT TD CFIF Val(SGrade.Grade) #Grade# /CFIF /TD/CFOUTPUT /TR/TABLE -Original Message- From: cf refactoring [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 10:38 AM To: CF-Talk Subject: Re: Format Tables (Was RE: CF to excel) Can you show us the looping code? It's probably an error in reusing too much of the sample code --- Janine Jakim [EMAIL PROTECTED] wrote: Thanks for all the input. Now for the next question. I am having a hard time formatting my html table correctly. I am using TRTH#Skill[1]#/TH TH#Skill[2]#/TH in the heading (I have also tried making it just a regular TRTD/TD/TR. But unfortunately it is giving each student a heading. ie: Reading MathSpelling JSmithA A A Reading MathSpelling SJonesB B B So I have 2 questions: 1. Is there a way to get the heading to be for the whole page when I am using a variable? 2. Is there a way to make the #skill[1]# #Skill[2]#, etc. expand/constrict accordingly. (ie: 5th grade Math has 3 skills/ reading has 16 skills whereas 1st grade math has 21 skills and 19 reading skills) I don't want to have to make a different page for each subject/grade. If I just put #Skill# in the header it only gives me the 1st skill... Any ideas??? -Original Message- From: John Anderson [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 4:00 PM To: CF-Talk Subject: RE: CF to excel You can create an html table and output that is an excel file as follows: CFSETTING ENABLECFOUTPUTONLY=YES cfif parameterexists(EmpName) cfinclude template=qry_employees.cfm cfif qry_employees.recordcount gt 0 cfset excelstring=table border=1trtdbFirst Name/b/td cfset excelstring=excelstring tdbLast Name/b/td cfset excelstring=excelstring tdbOffice Phone/b/td cfset excelstring=excelstring tdbMobile Phone/b/td cfset excelstring=excelstring tdbPager/b/td/tr cfoutput query=qry_employees cfset excelstring=excelstring trtd#empfirstname#/tdtd#emplastname#/tdtd#officep#/tdtd#ce ll#/tdtd#pager#/td/tr /cfoutput cfset excelstring=excelstring /table /cfif /cfif CFHEADER NAME=Content-Disposition VALUE=inline; filename=download.xls cfcontent type=application/vnd.ms-excel cfoutput#excelstring#/cfoutput CFSETTING ENABLECFOUTPUTONLY=No This output string that you have built will come across as an excel file. The key is in the cfcontent tag and cfheader tag. John Anderson aloha-webdesign.com -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 12:40 PM To: CF-Talk Subject: CF to excel How flexible is the process of generating excel files? I need to have an output that is dynamic for the columns and rows. For example: #student# #student# #student# #student# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# Translating into: JohnSmith JanSmithSamJonessandyJones Reading C A A B Math B A B A English B B A C My tables are normalized. There are many tables that make this info. 1. One reference table that lists all the skills. 2. One table that shows student information. 3. One table that lists the studentID/skillID/Grade (hooks the student info with the skills reference table). 4. One reference table that lists the quarter and dates of the quarter so only the current quarter prints out. Is this possible? What are the steps to making it so? Do I need to make the information into an array(s) first? I've read the how to from Ben's CF5 book and the tutorial from cfcomet.com- but of course I want to make things more difficult. Thanks in advance
RE: Format Tables (Was RE: CF to excel)
Janine, There seems to be an error in your posted code, as you have 3 cfoutputs to 2 /cfoutput. I'm surprised CF didn't give you an error message. It looks to me like you need to take the CFOUTPUTTH#Skill#/TH/CFOUTPUT outside so it isn't nested inside CFOUTPUT query=SGradegroup=PERMNUM I'd do something like Table CFOUTPUT query=SGradeTH#Skill#/TH/CFOUTPUT CFOUTPUT query=SGrade group=PERMNUM ... Also, there's a place where it reads /TD/CFOUTPUT /TR/TABLE where the /tr should go inside of /cfoutput --- Janine Jakim [EMAIL PROTECTED] wrote: Ok I answered question 2. I found that using CFOUTPUTTH#Skill#/TH/CFOUTPUT will go through all the skills so that I don't need to do Skill1, Skill2, Skill3 Now I still have the issue of my headers showing up before each student. This is my code: Table CFOUTPUT query=SGradegroup=PERMNUM TR THnbsp;/THCFOUTPUTTH#Skill#/TH/CFOUTPUT /TR TR CFIF Val(SGrade.StudentID) TD#LASTNAME#, #FIRSTNAME# /TD/CFIF CFOUTPUT TD CFIF Val(SGrade.Grade) #Grade# /CFIF /TD/CFOUTPUT /TR/TABLE -Original Message- From: cf refactoring [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 10:38 AM To: CF-Talk Subject: Re: Format Tables (Was RE: CF to excel) Can you show us the looping code? It's probably an error in reusing too much of the sample code --- Janine Jakim [EMAIL PROTECTED] wrote: Thanks for all the input. Now for the next question. I am having a hard time formatting my html table correctly. I am using TRTH#Skill[1]#/TH TH#Skill[2]#/TH in the heading (I have also tried making it just a regular TRTD/TD/TR. But unfortunately it is giving each student a heading. ie: Reading MathSpelling JSmith A A A Reading MathSpelling SJones B B B So I have 2 questions: 1. Is there a way to get the heading to be for the whole page when I am using a variable? 2. Is there a way to make the #skill[1]# #Skill[2]#, etc. expand/constrict accordingly. (ie: 5th grade Math has 3 skills/ reading has 16 skills whereas 1st grade math has 21 skills and 19 reading skills) I don't want to have to make a different page for each subject/grade. If I just put #Skill# in the header it only gives me the 1st skill... Any ideas??? -Original Message- From: John Anderson [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 4:00 PM To: CF-Talk Subject: RE: CF to excel You can create an html table and output that is an excel file as follows: CFSETTING ENABLECFOUTPUTONLY=YES cfif parameterexists(EmpName) cfinclude template=qry_employees.cfm cfif qry_employees.recordcount gt 0 cfset excelstring=table border=1trtdbFirst Name/b/td cfset excelstring=excelstring tdbLast Name/b/td cfset excelstring=excelstring tdbOffice Phone/b/td cfset excelstring=excelstring tdbMobile Phone/b/td cfset excelstring=excelstring tdbPager/b/td/tr cfoutput query=qry_employees cfset excelstring=excelstring trtd#empfirstname#/tdtd#emplastname#/tdtd#officep#/tdtd#ce ll#/tdtd#pager#/td/tr /cfoutput cfset excelstring=excelstring /table /cfif /cfif CFHEADER NAME=Content-Disposition VALUE=inline; filename=download.xls cfcontent type=application/vnd.ms-excel cfoutput#excelstring#/cfoutput CFSETTING ENABLECFOUTPUTONLY=No This output string that you have built will come across as an excel file. The key is in the cfcontent tag and cfheader tag. John Anderson aloha-webdesign.com -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 12:40 PM To: CF-Talk Subject: CF to excel How flexible is the process of generating excel files? I need to have an output that is dynamic for the columns and rows. For example: #student# #student# #student# #student# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# Translating into: JohnSmith JanSmithSamJonessandyJones Reading C A A B MathB A B A English B B A C My tables are normalized
Re: CF to excel
Excel can read the following kinds of files: comma delimited files tab delimited files HTML tables I prefer HTML tables as you get to keep all the formatting information. For example, if you cut and paste the following table code into a file table tr tdbheading/b/td tdiitalic/i/td tdfont color=#123456colored/font/td /tr tr td bgcolor=#FEDCBAdata/td tdone/td tdtwo/td /tr /table You can open it with excel and see the result. This doesn't exactly answer your question as I'm not sure exactly how dynamic you need your data to be. --- Janine Jakim [EMAIL PROTECTED] wrote: How flexible is the process of generating excel files? = I-Lin Kuo Macromedia CF5 Advanced Developer Sun Certified Java 2 Programmer ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF to excel
You can create an html table and output that is an excel file as follows: CFSETTING ENABLECFOUTPUTONLY=YES cfif parameterexists(EmpName) cfinclude template=qry_employees.cfm cfif qry_employees.recordcount gt 0 cfset excelstring=table border=1trtdbFirst Name/b/td cfset excelstring=excelstring tdbLast Name/b/td cfset excelstring=excelstring tdbOffice Phone/b/td cfset excelstring=excelstring tdbMobile Phone/b/td cfset excelstring=excelstring tdbPager/b/td/tr cfoutput query=qry_employees cfset excelstring=excelstring trtd#empfirstname#/tdtd#emplastname#/tdtd#officep#/tdtd#ce ll#/tdtd#pager#/td/tr /cfoutput cfset excelstring=excelstring /table /cfif /cfif CFHEADER NAME=Content-Disposition VALUE=inline; filename=download.xls cfcontent type=application/vnd.ms-excel cfoutput#excelstring#/cfoutput CFSETTING ENABLECFOUTPUTONLY=No This output string that you have built will come across as an excel file. The key is in the cfcontent tag and cfheader tag. John Anderson aloha-webdesign.com -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 12:40 PM To: CF-Talk Subject: CF to excel How flexible is the process of generating excel files? I need to have an output that is dynamic for the columns and rows. For example: #student# #student# #student# #student# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# Translating into: JohnSmith JanSmithSamJonessandyJones Reading C A A B MathB A B A English B B A C My tables are normalized. There are many tables that make this info. 1. One reference table that lists all the skills. 2. One table that shows student information. 3. One table that lists the studentID/skillID/Grade (hooks the student info with the skills reference table). 4. One reference table that lists the quarter and dates of the quarter so only the current quarter prints out. Is this possible? What are the steps to making it so? Do I need to make the information into an array(s) first? I've read the how to from Ben's CF5 book and the tutorial from cfcomet.com- but of course I want to make things more difficult. Thanks in advance. ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF to excel
It is just like from a database. Only difference is how you call the table. CFQUERY NAME=getGrades DATASOURCE=datasource SELECT DISTINCT [YOURFIELD] FROM `YOURTABLE$` /CFQUERY Make sure that you have the spreadsheet set up as a system DSN and then make certain you place the ` in front of your tablename and the $` after your table name. Then output your query just like you do from a database query Larry Juncker Senior Cold Fusion Developer Heartland Communications Group, Inc. [EMAIL PROTECTED] -Original Message- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 2:40 PM To: CF-Talk Subject: CF to excel How flexible is the process of generating excel files? I need to have an output that is dynamic for the columns and rows. For example: #student# #student# #student# #student# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# #Skill# #grade# #grade# #grade# #grade# Translating into: JohnSmith JanSmithSamJonessandyJones Reading C A A B MathB A B A English B B A C My tables are normalized. There are many tables that make this info. 1. One reference table that lists all the skills. 2. One table that shows student information. 3. One table that lists the studentID/skillID/Grade (hooks the student info with the skills reference table). 4. One reference table that lists the quarter and dates of the quarter so only the current quarter prints out. Is this possible? What are the steps to making it so? Do I need to make the information into an array(s) first? I've read the how to from Ben's CF5 book and the tutorial from cfcomet.com- but of course I want to make things more difficult. Thanks in advance. ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: CF and Excel
I do it a couple of ways. First, you can create a comma delimited file (.csv) and then using cfcontent, deliver it right to the browser to be downloaded, or you can write it to the server to be downloaded later. Or, I often use the CFX_EXCEL custom tag from the exchange. You need Excel on the server and be sure to LOCK properly, but this produces an actual .xls file. Again, you can either download directly or write to the hard drive. Either way works. Dave - Original Message - From: David Baskin [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Thursday, June 21, 2001 7:50 PM Subject: CF and Excel Hello, i've been tasked with taking data out of a SQL database and inserting it into an excel spread sheet. I went to CFComet and read through their instructions and ran their sample code, but i cannot get it to work. I get the following error: Error Diagnostic Information Error trying to create object specified in the tag. COM error 0x80040154. Class not registered Does anyone know how best to connect and write to excel and if there is a good tutorial that i can learn from. Creating and connecting to objects is new to me, so i'm a little lost. Thanks for any help. david ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF and Excel
David, You got that error because Excel is not registered on your server. Assuming that Excel is in fact installed on your server, you can register it by following the directions at http://www.cfcomet.com/cfcomet/Other/index.cfm?ArticleID=32381637-0922-41CA- BBE305C2D66A7025#2. Note that this technique creates an Excel file on the server, which users can then download. A simpler method is to use CFCONTENT and CFHEADER to send the data to the Excel application on your users' machines. -David On Thursday, June 21, 2001 4:51 PM, David Baskin [SMTP:[EMAIL PROTECTED]] wrote: Hello, i've been tasked with taking data out of a SQL database and inserting it into an excel spread sheet. I went to CFComet and read through their instructions and ran their sample code, but i cannot get it to work. I get the following error: Error Diagnostic Information Error trying to create object specified in the tag. COM error 0x80040154. Class not registered Does anyone know how best to connect and write to excel and if there is a good tutorial that i can learn from. Creating and connecting to objects is new to me, so i'm a little lost. Thanks for any help. david ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: [CF-Talk] excel and CF
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --_=_NextPart_001_01C02260.DCB649F0 Content-Type: text/plain; charset="iso-8859-1" you have to insert the comma characters in ascii format. ie. cfoutput#variable1##chr(9)##variable2##chr(9)#/cfoutput -Original Message- From: S C [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 19, 2000 12:10 PM To: [EMAIL PROTECTED] Subject: [CF-Talk] excel and CF --0-1884661237-969379817=:10166 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I am looking for someone who has had the same problem that I am having and has suggestions on how to overcome it. PROBLEM: Want to dump results from a query into an excel file using the cfcontent tag. This code worked in CF 3.0 but after upgrading to 4.5 it dumps all the data into one cell. What is causing this and how do I get the data to dump into separate cells? I have attached the code. It consists of two pages for simplicity. There is a form page and an action page. Once you submit the form, the action page should open up excel and display the data in excel. Any suggestions are appreciated. Again the problem is that the data is now being dumped into one cell instead of being separated. __ Do You Yahoo!? Send instant messages get email alerts with Yahoo! Messenger. http://im.yahoo.com/ --0-1884661237-969379817=:10166 Content-Type: text/html; name="test.cfm" Content-Description: test.cfm Content-Disposition: inline; filename="test.cfm" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" html head titleUntitled/title /head body FORM action="test2.cfm/test2.xls" method="POST" INPUT type="submit" Value="Export Data" /FORM /body /html --0-1884661237-969379817=:10166 Content-Type: text/html; name="test2.cfm" Content-Description: test2.cfm Content-Disposition: inline; filename="test2.cfm" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" CFQUERY NAME="GetBeans" DATASOURCE="FastTrack_Lab" select * from beans /CFQUERY html head titleUntitled/title /head body CFCONTENT TYPE="application/msexcel" beanid beanname CFOUTPUT query="GetBeans" #bean_id# #bean_name# /CFOUTPUT /body /html --0-1884661237-969379817=:10166-- -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. --_=_NextPart_001_01C02260.DCB649F0 Content-Type: text/html; charset="iso-8859-1" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" HTML HEAD META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1" META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12" TITLERE: [CF-Talk] excel and CF/TITLE /HEAD BODY PFONT SIZE=2you have to insert the comma characters in ascii format. ie./FONT /P PFONT SIZE=2lt;cfoutputgt;#variable1##chr(9)##variable2##chr(9)#lt;/cfoutputgt;/FONT /P PFONT SIZE=2-Original Message-/FONT BRFONT SIZE=2From: S C [A HREF="mailto:[EMAIL PROTECTED]"mailto:[EMAIL PROTECTED]/A]/FONT BRFONT SIZE=2Sent: Tuesday, September 19, 2000 12:10 PM/FONT BRFONT SIZE=2To: [EMAIL PROTECTED]/FONT BRFONT SIZE=2Subject: [CF-Talk] excel and CF/FONT /P BR PFONT SIZE=2--0-1884661237-969379817=:10166/FONT BRFONT SIZE=2Content-Type: text/plain; charset=us-ascii/FONT BRFONT SIZE=2Content-Disposition: inline/FONT /P PFONT SIZE=2I am looking for someone who has had the same problem/FONT BRFONT SIZE=2that I am having and has suggestions on how to/FONT BRFONT SIZE=2overcome it./FONT /P PFONT SIZE=2PROBLEM:nbsp; Want to dump results from a query into an/FONT BRFONT SIZE=2excel file using the cfcontent tag.nbsp; This code worked/FONT BRFONT SIZE=2in CF 3.0 but after upgrading to 4.5 it dumps all the/FONT BRFONT SIZE=2data into one cell.nbsp; What is causing this and how do I/FONT BRFONT SIZE=2get the data to dump into separate cells?/FONT /P PFONT SIZE=2I have attached the code.nbsp; It consists of two pages/FONT BRFONT SIZE=2for simplicity.nbsp; There is a form page and an action/FONT BRFONT SIZE=2page./FONT BRFONT SIZE=2Oncenbsp; you submit the form, the action page should open/FONT BRFONT SIZE=2up excel and display the data in excel./FONT /P PFONT SIZE=2Any suggestions are appreciated.nbsp; Again the problem is/FONT BRFONT SIZE=2that the data is now being dumped into one cell/FONT BRFONT SIZE=2instead of being separated./FONT /P BR BR PFONT SIZE=2__/FONT BRFONT SIZE=2Do You Yahoo!?/FONT BRFONT SIZE=2Send instant messages amp; get email alerts with Yahoo! Messenger./FONT BRFONT SIZE=2A HREF="http://im.yahoo.com/" TARGET="_blank"http://im.yahoo.com//A/FONT BRFONT
RE: [CF-Talk] excel and CF
PROBLEM: Want to dump results from a query into an excel file using the cfcontent tag. This code worked in CF 3.0 but after upgrading to 4.5 it dumps all the data into one cell. What is causing this and how do I get the data to dump into separate cells? I have attached the code. It consists of two pages for simplicity. There is a form page and an action page. Once you submit the form, the action page should open up excel and display the data in excel. Any suggestions are appreciated. Again the problem is that the data is now being dumped into one cell instead of being separated. One thing that strikes me is that you're including HTML tags in your output file, which you're setting as "application/msexcel" using CFCONTENT. Another thing is that you might use a comma as a delimiter instead of a tab - it's more likely to work as desired. Here are some examples: http://www.figleaf.com/demo/mimetest/ Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: [CF-Talk] excel and CF
Try this: cfcontent type="text/x-excel-csv"CFOUTPUT#form.outputstring#/CFOUTPUT S C [EMAIL PROTECTED] on 09/19/2000 12:10:17 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Jerry Tolentino/SIAC) Subject: [CF-Talk] excel and CF --0-1884661237-969379817=:10166 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I am looking for someone who has had the same problem that I am having and has suggestions on how to overcome it. PROBLEM: Want to dump results from a query into an excel file using the cfcontent tag. This code worked in CF 3.0 but after upgrading to 4.5 it dumps all the data into one cell. What is causing this and how do I get the data to dump into separate cells? I have attached the code. It consists of two pages for simplicity. There is a form page and an action page. Once you submit the form, the action page should open up excel and display the data in excel. Any suggestions are appreciated. Again the problem is that the data is now being dumped into one cell instead of being separated. __ Do You Yahoo!? Send instant messages get email alerts with Yahoo! Messenger. http://im.yahoo.com/ --0-1884661237-969379817=:10166 Content-Type: text/html; name="test.cfm" Content-Description: test.cfm Content-Disposition: inline; filename="test.cfm" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" html head titleUntitled/title /head body FORM action="test2.cfm/test2.xls" method="POST" INPUT type="submit" Value="Export Data" /FORM /body /html --0-1884661237-969379817=:10166 Content-Type: text/html; name="test2.cfm" Content-Description: test2.cfm Content-Disposition: inline; filename="test2.cfm" !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" CFQUERY NAME="GetBeans" DATASOURCE="FastTrack_Lab" select * from beans /CFQUERY html head titleUntitled/title /head body CFCONTENT TYPE="application/msexcel" beanidbeanname CFOUTPUT query="GetBeans" #bean_id# #bean_name# /CFOUTPUT /body /html --0-1884661237-969379817=:10166-- --- --- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: [CF-Talk] excel and CF
Actually, you can get very quick (and nice) results using a mime type of "application/vnd.ms-excel" This lets you output your page as an html table, formatting things very nicely in Excel. -- Billy Cravens [EMAIL PROTECTED] Dave Watts wrote: PROBLEM: Want to dump results from a query into an excel file using the cfcontent tag. This code worked in CF 3.0 but after upgrading to 4.5 it dumps all the data into one cell. What is causing this and how do I get the data to dump into separate cells? I have attached the code. It consists of two pages for simplicity. There is a form page and an action page. Once you submit the form, the action page should open up excel and display the data in excel. Any suggestions are appreciated. Again the problem is that the data is now being dumped into one cell instead of being separated. One thing that strikes me is that you're including HTML tags in your output file, which you're setting as "application/msexcel" using CFCONTENT. Another thing is that you might use a comma as a delimiter instead of a tab - it's more likely to work as desired. Here are some examples: http://www.figleaf.com/demo/mimetest/ Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: CF to Excel
I just ran into this myself and heres what I came up with. The problem was with CFCOntent and NT SP6 and 6a. I hope can help someone... !--- Sorry about the bad word but no one will see it but us Created by Jesse 'KingJes' Kilgore 06/05/00 with the help of mastering CF 4.5 and some news groups...SWEET! --- !--- This is grabbing all the current user Info from the CMT dB I could add stuff to make the query better like adding some where clauses ect to run the query based on what the user is looking for i.e. #form.whatever# ect --- CFQUERY NAME="GetMyShit" DATASOURCE="CMT" SELECT AdviserName, AdviserAspect, CoachName FROM UserInfo /CFQUERY !--- This is writing the file to d:\temp on castle_weba so later I can grab it and open it in .xsl with out useing the CF Content tag which is hosed with SP 6 for NT --- !--- May need to create the file and name it the date and time it was run inorder to prevent file errors and locks. --- CFSET tempfile = "e:\inetpub\wwwroot\reports\exptemp.csv"!---D:\reports\exptemp.csv D:\temp\exptemp.csv --- !--- this is creating the temp file coloum names and leaving the rest of the column blank --- CFSET output = "" CFSET output = output "AdviserName,AdviserAspect,CoachName" CFFILE ACTION="WRITE" FILE="#tempfile#" OUTPUT="#output#" !--- This is grabbing the information in the column so later Ill drop it into the spredsheet. I a little afraid useing the loop but it seems to be working fine. --- CFLOOP QUERY="GetMyShit" CFSET output = "" CFSET output = output "#AdviserName#,#AdviserAspect#,#CoachName#" !--- This is 'APPENDING' what the loop above grabbed to the .xls file written earlier by the the WRITE action of the cffile --- CFFILE ACTION="Append" FILE="#tempfile#" OUTPUT="#output#" Variable="application/msexcel"!--- a href="../Reports/exptemp.csv"Untitled/a --- !--- Im not sure if that variable is really doing anything but the book said that it needed it? I dont know but I do know that if it works dont mess with it --- /CFLOOP !--- This is a link to the file just written to the temp folder so the user can open it. I need to create a shared folder on the network b4 I would even think of useing this on the floor. Im thinking the uploads folder but Ill see. --- a href="\\castle_weba/reports/exptemp.csv"Click Here to open your report in Excel!/a!--- \\castle_weba/d$/TEMP/exptemp.csv --- !--- \\castle_weba/d$/reports/exptemp.csv --- -Original Message- From: Cary Gordon [mailto:[EMAIL PROTECTED]] Sent: Monday, June 05, 2000 7:22 AM To: [EMAIL PROTECTED] Subject: Re: CF to Excel The easiest way is to output an Excel readable text file, like a csv or tab delimited file. Cary At 02:01 PM 6/2/2000 -0700, you wrote: How can I take the results of a Query and save it as an Excel file? This is what I though would work. Thanks all! CFQUERY NAME="DIMS" DATASOURCE="DSTS" SELECT END_ITEM_ROOT_PN, END_ITEM_SN FROM DSTS.B_V_DSTS_ASSEMBLY ORDER BY END_ITEM_ROOT_PN, END_ITEM_SN /CFQUERY cfcontent type="application/msexcel" CFOUTPUT QUERY="DIMS"#END_ITEM_ROOT_PN# #END_ITEM_SN#/CFOUTPUT Jim Ray Delta Program NT Administrator The Boeing Company (714) 896-2038 Email: [EMAIL PROTECTED] Website: http://deltaweb.lgb.cal.boeing.com/ -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: CF to Excel
I dont know if the last email I sent will reach you so here you go... !--- Sorry about the bad word but no one will see it but us Created by Jesse 'KingJes' Kilgore 06/05/00 with the help of mastering CF 4.5 and some news groups...SWEET! --- !--- This is grabbing all the current user Info from the CMT dB I could add stuff to make the query better like adding some where clauses ect to run the query based on what the user is looking for i.e. #form.whatever# ect --- CFQUERY NAME="GetMyShit" DATASOURCE="CMT" SELECT AdviserName, AdviserAspect, CoachName FROM UserInfo /CFQUERY !--- This is writing the file to d:\temp on castle_weba so later I can grab it and open it in .xsl with out useing the CF Content tag which is hosed with SP 6 for NT --- !--- May need to create the file and name it the date and time it was run inorder to prevent file errors and locks. --- CFSET tempfile = "e:\inetpub\wwwroot\reports\exptemp.csv"!---D:\reports\exptemp.csv D:\temp\exptemp.csv --- !--- this is creating the temp file coloum names and leaving the rest of the column blank --- CFSET output = "" CFSET output = output "AdviserName,AdviserAspect,CoachName" CFFILE ACTION="WRITE" FILE="#tempfile#" OUTPUT="#output#" !--- This is grabbing the information in the column so later Ill drop it into the spredsheet. I a little afraid useing the loop but it seems to be working fine. --- CFLOOP QUERY="GetMyShit" CFSET output = "" CFSET output = output "#AdviserName#,#AdviserAspect#,#CoachName#" !--- This is 'APPENDING' what the loop above grabbed to the .xls file written earlier by the the WRITE action of the cffile --- CFFILE ACTION="Append" FILE="#tempfile#" OUTPUT="#output#" Variable="application/msexcel"!--- a href="../Reports/exptemp.csv"Untitled/a --- !--- Im not sure if that variable is really doing anything but the book said that it needed it? I dont know but I do know that if it works dont mess with it --- /CFLOOP !--- This is a link to the file just written to the temp folder so the user can open it. I need to create a shared folder on the network b4 I would even think of useing this on the floor. Im thinking the uploads folder but Ill see. --- a href="\\castle_weba/reports/exptemp.csv"Click Here to open your report in Excel!/a!--- \\castle_weba/d$/TEMP/exptemp.csv --- !--- \\castle_weba/d$/reports/exptemp.csv --- -Original Message- From: Cary Gordon [mailto:[EMAIL PROTECTED]] Sent: Monday, June 05, 2000 7:22 AM To: [EMAIL PROTECTED] Subject: Re: CF to Excel The easiest way is to output an Excel readable text file, like a csv or tab delimited file. Cary At 02:01 PM 6/2/2000 -0700, you wrote: How can I take the results of a Query and save it as an Excel file? This is what I though would work. Thanks all! CFQUERY NAME="DIMS" DATASOURCE="DSTS" SELECT END_ITEM_ROOT_PN, END_ITEM_SN FROM DSTS.B_V_DSTS_ASSEMBLY ORDER BY END_ITEM_ROOT_PN, END_ITEM_SN /CFQUERY cfcontent type="application/msexcel" CFOUTPUT QUERY="DIMS"#END_ITEM_ROOT_PN# #END_ITEM_SN#/CFOUTPUT Jim Ray Delta Program NT Administrator The Boeing Company (714) 896-2038 Email: [EMAIL PROTECTED] Website: http://deltaweb.lgb.cal.boeing.com/ -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: CF to Excel
The easiest way is to output an Excel readable text file, like a csv or tab delimited file. Cary At 02:01 PM 6/2/2000 -0700, you wrote: How can I take the results of a Query and save it as an Excel file? This is what I though would work. Thanks all! CFQUERY NAME="DIMS" DATASOURCE="DSTS" SELECT END_ITEM_ROOT_PN, END_ITEM_SN FROM DSTS.B_V_DSTS_ASSEMBLY ORDER BY END_ITEM_ROOT_PN, END_ITEM_SN /CFQUERY cfcontent type="application/msexcel" CFOUTPUT QUERY="DIMS"#END_ITEM_ROOT_PN# #END_ITEM_SN#/CFOUTPUT Jim Ray Delta Program NT Administrator The Boeing Company (714) 896-2038 Email: [EMAIL PROTECTED] Website: http://deltaweb.lgb.cal.boeing.com/ -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: CF to Excel
There are several Custom tags availabe on the Allaire tag gallery that will allow you to do this if you want to do it that way. Try this: http://devex.allaire.com/Developer/Gallery/SearchResults.cfm?keywords=excel Hope that helps, Sam Dutkin Programmer Internet Development IBS Interactive (NASDAQ: IBSX) Phone: (856) 985-5200, x 101 Fax: (856) 985-3363 [EMAIL PROTECTED] -Original Message- From: Ray, James A [mailto:[EMAIL PROTECTED]] Sent: Friday, June 02, 2000 5:01 PM To: [EMAIL PROTECTED] Subject: CF to Excel How can I take the results of a Query and save it as an Excel file? This is what I though would work. Thanks all! CFQUERY NAME="DIMS" DATASOURCE="DSTS" SELECT END_ITEM_ROOT_PN, END_ITEM_SN FROM DSTS.B_V_DSTS_ASSEMBLY ORDER BY END_ITEM_ROOT_PN, END_ITEM_SN /CFQUERY cfcontent type="application/msexcel" CFOUTPUT QUERY="DIMS"#END_ITEM_ROOT_PN# #END_ITEM_SN#/CFOUTPUT Jim Ray Delta Program NT Administrator The Boeing Company (714) 896-2038 Email: [EMAIL PROTECTED] Website: http://deltaweb.lgb.cal.boeing.com/ -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: CF to Excel
Try writing your output with CFFile First, create a new file with your first line being a tab delimited column head names: cffile action="WRITE" file="C:/filepath/file.xls" output="Heading1 Heading2Heading3" addnewline="Yes" Next, append your query results, again, delimit with tabs -- you'll want to surround your CFFile-append with a CFLoop query loop: cffile action="APPEND" file="C:/filepath/file.xls" output="#heading1column# #heading2column##heading3column#" addnewline="Yes" H. = Howard Owens Web Producer InsideVC.com mailto:[EMAIL PROTECTED] = -Original Message- From: Ray, James A [SMTP:[EMAIL PROTECTED]] Sent: Friday, June 02, 2000 2:01 PM To: [EMAIL PROTECTED] Subject: CF to Excel How can I take the results of a Query and save it as an Excel file? This is what I though would work. Thanks all! CFQUERY NAME="DIMS" DATASOURCE="DSTS" SELECT END_ITEM_ROOT_PN, END_ITEM_SN FROM DSTS.B_V_DSTS_ASSEMBLY ORDER BY END_ITEM_ROOT_PN, END_ITEM_SN /CFQUERY cfcontent type="application/msexcel" CFOUTPUT QUERY="DIMS"#END_ITEM_ROOT_PN# #END_ITEM_SN#/CFOUTPUT -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.