Solved

Export to Excel/Problems on Macintosh

Posted on 2002-07-18
8
148 Views
Last Modified: 2013-12-24
I already have my data exporting to excel and works perfectly on a Windows and IE.. But on IE on MacOS all it wants to do is download my .cfm page that executes the exporting to excel... Is there anyone out that has experience with this type of problem on a Mac.

Thanks
Jeff
0
Comment
Question by:jeffmace
  • 4
  • 2
  • 2
8 Comments
 
LVL 5

Expert Comment

by:CFXPERT
ID: 7162905
Which OS has CF server running on it.  WIN or MAC?
the only reason I can think of is that if you CF server running on a web server on a MAC OS, there's a problem and the service is running correctly
0
 

Author Comment

by:jeffmace
ID: 7162912
Its CF Server 5 on a Windows 2000 system.
0
 
LVL 5

Expert Comment

by:CFXPERT
ID: 7162923
and when viewing the page from a MAC OS it wants to download the file?  Havn't come across that one yet.  I'll do some checkin for ya though.
0
 

Author Comment

by:jeffmace
ID: 7162929
Thank you... On a Windows system.. It will prompt to either open or save the excel file.. On the Mac it just wants to download the .cfm file.  I find it rather strange myself.

This here is some of the code I use for creating the excel file.. Maybe it will help...

<CFCONTENT TYPE="application/msexcel">
<cfset Date="#DateFormat(now(), 'mm/dd/yy')# #TimeFormat(now(), 'hh:mm tt')#">
<CFSET filename="AdPages_#getMagazine.magazine_desc#-#URL.Issue_Date#.xls">
<cfoutput><CFHEADER NAME="Content-Disposition" Value="filename=#filename#"></cfoutput>
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 17

Accepted Solution

by:
anandkp earned 100 total points
ID: 7169250
Hi Jeffmace,

use the following code ... & it will work in Mac as well - I just checked it !!!

========================================================

<!--- Anand K Patel --->

<CFSET systempath = "C:/Clients/Jeffmace/"><!--- Of ur Root directory on server --->
<CFSET SystemUrl = "http://www.Jeffmace.com/"><!--- Site url - mapping to root directory --->
 
<!--- file u wanna download is "NewsLetter.cfm" --->
<CFOUTPUT>
<A HREF="#SystemUrl#Download.cfm?sPath=#systempath#/NewsLetter.txt&sFileName=NewsLetter.txt">Download Now !</A>
</CFOUTPUT>


<!--- following is the code for Download.cfm - save this file in ur root directory as download.cfm --->
<!--- ========================================================================================================== --->

<CFIF FILEEXISTS('#systempath#')>    

     <!--- file_to_be_download.cfm - Name of file to be downloaded. --->    
     <CFHEADER NAME="content-disposition" VALUE="attachment; filename=#SFILENAME#">
     
     <!--- get teh physical [c:\asdas\asda\asdas.cfm] path for the file to be downloaded. --->
     <CFCONTENT TYPE="application/octet-stream" FILE="#systempath#" DELETEFILE="FALSE" RESET="TRUE">

</CFIF>

<!--- ========================================================================================================== --->

K'Rgds
Anand
0
 

Author Comment

by:jeffmace
ID: 7169913
I guess I was stupid and forgot to mention that I am creating the Excel sheet on the fly.  Its going a query to formulate the numbers and asks a PC user to open or save it.  What the mac is doing is just asking to download the .cfm file that is generating the output to excel.  So I am not actually trying to get a file off the server.  I am creating the file instantly all the time.  So I am clicking on a button that is generating the up-to-date numbers and allowing me to view them and save them in an excel file.. Does that change the code you presented to me.

Jeff
0
 
LVL 17

Expert Comment

by:anandkp
ID: 7170984
Hi Jeff, yes it does ...

but u could just modify this code - such that - u call a page that creates the .xls file on the fly & then have the code for download.cfm below it - so it would download the latest created file.

u could also delete a file as soon as its downloaded - by changing the parameter in CFContent & setting deletefile = True.

thus u have the latest file being downloaded to the users machine.

hope this helps

K'Rgds
Anand
0
 

Author Comment

by:jeffmace
ID: 7180060
Thanks again!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now