Still debugging and diagnosing. I haven't had a chance to test this with SSL yet, which has its own set of problems, but this corrected export issues that I was seeing with IE7 and IE8.
In views_export_xls.module, line ~37, remove the drupal_add_http_header line and add these replacement drupal_add_http_header calls beneath $filename:
/**
* Preprocess xls output template.
*/
function template_preprocess_views_export_xls_view_xls(&$vars) {
$view = $vars['view'];
$fields = &$view->field;
$filename = strtr(
$vars['options']['filename'],
array('%view' => check_plain($view->name))
);
drupal_add_http_header("Cache-Control", "private,pre-check=0,post-check=0,max-age=0");
drupal_add_http_header("Content-Description", "File Transfer");
drupal_add_http_header("Content-Disposition", "attachment; filename=$filename");
drupal_add_http_header("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
drupal_add_http_header("Content-Transfer-Encoding", "binary");
// ...
I believe that is the correct Cache-Control line to allow IE to download XLS files over SSL.
The Content-Type should be the newer Open format (XML) vs the legacy XLS format.
In all versions of IE, this should give you the Open/Save dialog correctly. Content-Description is probably not necessary?
Comments
Comment #1
jason.fisher CreditAttribution: jason.fisher commentedComment #2
jason.fisher CreditAttribution: jason.fisher commented