Link to home
Start Free TrialLog in
Avatar of jeffmace
jeffmace

asked on

Export to Excel/Problems on Macintosh

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
Avatar of CFXPERT
CFXPERT

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
Avatar of jeffmace

ASKER

Its CF Server 5 on a Windows 2000 system.
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.
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>
ASKER CERTIFIED SOLUTION
Avatar of anandkp
anandkp
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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
Thanks again!