Solved

Export to Excel/Problems on Macintosh

Posted on 2002-07-18
8
153 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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

808 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