[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Export to Excel/Problems on Macintosh

Posted on 2002-07-18
8
Medium Priority
?
161 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
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
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.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

649 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