diff options
| author | mark <mark> | 2009-12-14 03:36:34 +0000 | 
|---|---|---|
| committer | mark <mark> | 2009-12-14 03:36:34 +0000 | 
| commit | 5b76f43134d5a78378c162ea980ddab31db089cb (patch) | |
| tree | 15ed52bc8da9977bcb81593c96e1d69ba9e0617a | |
| parent | d84fbd3987192e9bece5fc074dd7507dd1e2c7b7 (diff) | |
Fix filename for Excel spreadsheet reports
| -rw-r--r-- | httemplate/search/elements/search-xls.html | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/httemplate/search/elements/search-xls.html b/httemplate/search/elements/search-xls.html index 8a05e477c..8323f55de 100644 --- a/httemplate/search/elements/search-xls.html +++ b/httemplate/search/elements/search-xls.html @@ -13,7 +13,9 @@ my %opt    = %{ $args{'opt'} };  #http://support.microsoft.com/kb/199841  http_header('Content-Type' => 'application/vnd.ms-excel' ); - +http_header('Content-Disposition' =>  +  'attachment;filename="'.($opt{'name'} || PL($opt{'name_singular'}) ).'.xls"'); +   #http://support.microsoft.com/kb/812935  #http://support.microsoft.com/kb/323308  $HTML::Mason::Commands::r->headers_out->{'Cache-control'} = 'max-age=0'; @@ -79,5 +81,5 @@ foreach my $row ( @$rows ) {  $workbook->close();# or die "Error creating .xls file: $!";  http_header('Content-Length' => length($data) ); -  +  </%init> | 
