On Mon, 2005-09-26 at 14:32 -0400, Alex Brelsfoard wrote:
> Hey all,
> 
> I have created a script that outputs a simple csv file to then be imported
> into Excel. I get the save file as dialog box, but I was wondering if
> there's anyway I can suggest a filename for it or at least a file type. The
> users for this system are really not all that technically savy. There's only
> one or two of them that I am confident will be able to always rename the
> file to end in '.txt'.
> Does anyone have any good suggestions for this situation?
> Thanks. Let me know if you need more info.

Is this a Win32 script or a CGI? Where is the dialog box generated?

If this is related to saving output from a CGI program through a
browser, you can suggest the filename to be saved by adding the header:
Content-disposition: filename=$filename

You can also encourage the browser to prompt to save or open with rather
than displaying the results by setting the content type, as with:
Content-type: text/tab-separated-values

I've used this to set the output of a "Save as" button to a filename
with .csv (or .tsv), which can easily be set in most browsers to default
to load in a spreadsheet, if it isn't set already.

HTH
-- 
Sean Quinlan <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to