Solved

Export to Excel/Problems on Macintosh

Posted on 2002-07-18
8
151 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
Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

 
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

Save on storage to protect fatherhood memories

You're the dad who has everything. This Father's Day, make sure your family memories are protected. My Passport Ultra has automatic backup and password protection to keep your cherished photos and videos safe. With up to 3TB, you have plenty of room to hold the adventures ahead.

Question has a verified solution.

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

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

896 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

15 Experts available now in Live!

Get 1:1 Help Now