Solved

Export to Excel/Problems on Macintosh

Posted on 2002-07-18
8
154 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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
 
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

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

733 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