ya I have about 3 different options I can offer them that would make things
a whole lot easier. But the look of the way this works has to replicate what
they currently have in Server Side Javascript (which I hav begun to hate
after this project). So I can do anything cool with Excel 2000, link
directly to the file or anything else that would make my life easier.

Misty

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Darin Spence
Sent: Thursday, February 21, 2002 2:27 PM
To: [EMAIL PROTECTED]
Subject: RE: [KCFusion] CFContent Issues


If the client is using Excel 2000, you might consider creating an Excel
file for them that uses the "Web Query" feature.  We've started doing
this as opposed to creating Excel files "on-the-fly."  Create a "raw
data" page (simple table with the data in it) then from Excel use a Web
Query and point to that page.  What's cool is in Excel you can just have
a sheet called "Raw Data," then other sheets that build graphs based on
the data on the fly.  When they want to update their graphs, they just
refresh the web query.

Good luck!
-Darin

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
Behalf Of Misty Woodward
Sent: Thursday, February 21, 2002 1:19 PM
To: [EMAIL PROTECTED]
Subject: [KCFusion] CFContent Issues


Hi all.  Hopefully someone here has ran into this problem...

I have an excel exporter type deal. Now before I get alternative
suggestions for how I can do this let me explain how it has to "look" to
the client.

I am on a page that shows a table format of query results. There is a
little Excel Icon that I click on to export my results to an XLS file
(not csv). A small window about 2 inches wide, 1 inch across pops up and
says "Building Excel File....Please wait"  so I CFFLUSH that much to the
page while it builds the file and writes it to the server using CFFILE.

Once that file is completely written I then display "Retrieving Data".
This is where I then through Javascript submit the page to another file
called getfile.cfm.  In getfile.cfm I am using CFCONTENT to retrieve
that file back out of the server and then delete it.

The problem is two things...

1. When I get the pop up box it says I am trying to download a file
"getfile.cfm" Why is it naming the file in the pop up box the name of my
CFM template?  But when I click save as it saves it with the correct
name "myfile.xls". Someone on the macromedia board suggested I put the
filename after the getfile.cfm page as you can see in the code below,
and it seems to fix this problem, but I dont know how stable this is.

2. When I click open instead of save as, it doesnt open. Instead, I get
a second dialog box asking me once again if I want to open or save as.
This time, if I choose open, it does open Excel and I can read the file.
Why would it give me this pop up twice?

After the file downloads I close the window that originally popped up.
Which also isn't working, but I think that is because CF isn't letting
me process the page anymore after I use CFCONTENT or submit to a new
page. Here is the code I am using...

gen_excel.cfm

<!--- Lots of code up here parsing out the excel sheet and query  blah
blah blah --->

<font id=medium><b> 2. Retrieving Data</b></font>
<form action="getfile.cfm/<cfoutput>#filename#</cfoutput>.xls"
method="post" name="TheForm">
        <input type="hidden" name="filename"
value="<cfoutput>#filename#</cfoutput>.xls">
</form>
<script language="JavaScript">
document.TheForm.submit();
</script>



getfile.cfm
<cfsetting enablecfoutputonly="yes">
<cfparam name="filename" default="download.xls">
<CFHEADER NAME="Content-Type" VALUE="application/unknown"> <CFHEADER
NAME="Content-Disposition" VALUE="attachment; filename=""#Filename#""">
<CFCONTENT TYPE="application/unknown" FILE="#path_to_tempdir##filename#"
deletefile="yes">
<cfsetting enablecfoutputonly="no">

Any help would be greatly appreciated.  The poeple at Macromedia and the
boards and such either don't know or just aren't helpful.

Thanks,
Misty Woodward
BigOSoftware
[EMAIL PROTECTED]
www.BigOSoftware.com
Contact us about our Developer Discount Program
6709 W 119th Street
Suite 422
Overland Park, KS 66209
913-219-2210



______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]




______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]



 
 
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]
 

Reply via email to