From: Matthew G. <gr...@mu...> - 2002-03-23 15:09:40
|
I've got this roughed in and working. I'm getting around headers/data being sent as follows: In export.inc on the CSV download url, I'm adding another parameter that is used in manage.php and when export.inc is called later to bypass any headers or data being sent. At your suggestion I split survey_export_cvs() into survey_export_cvs() and survey_generate_cvs() As for as mime types: I'm considering "application/x-msexcel" or "text/plain-text". We've used x-msexcel before to "trick" excel into opening tab delimited text files. Not sure how it will work for csv. How's this sound? --On Friday, March 22, 2002 03:00:06 PM -0500 "James E. Flemer" <jf...@ac...> wrote: > Please do! How do you plan to do this? I was thinking that > there would have to be some script outside the > admin/include framework to do this (since by then there are > already headers/data sent). This script outside should use > a content-type of "application/x-csv"(?) and return the > actual csv data. I would suggest splitting the exising > survey_export_cvs() into: > survey_generate_cvs() -- creates a string/array of data > survey_export_cvs() -- calls generate, and writes to file > Then your download script could call generate, and just > print the appropriate headers then the data directly. > > -James > > On Fri, 22 Mar 2002, Matthew Gregg wrote: > >> Cool. Since that was done so fast. I can move on to the next change. >> Unless someone objects or has already started it, I would like to add >> "download" to the export function. > |