From the Results tab, I am able to successfully select and use the options: Submissions, Analysis and Table to see the results. But I am not able to use the "Download" option whether it be "delimited text" or "microsoft excel" or one of the selections for "delimted text format." In every case for "Download", I receive the Microsoft Internet Explorer (version 6.0.2900.5512.... ) message:

"Internet Explorer cannot download download from xxxx.xxxx.edu.

Intenet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."

I am signed in as the superuser (1) account. The download works in Mozilla Firefox.

Comments

rjl’s picture

I get the same issue with version 6.x-2.3

Same error message, same browser.

In addition to it working fine with Firefox, it also works fine with Chrome and Opera

I have been doing some research on this, and I believe it is an IE issue with the headers from what I have been able to cobble together so far, but haven't yet found anything definitive. Will keep looking and report back if I find out anything that may be useful.

Thanks

rjl’s picture

Well, it's not definitive, but I found a solution that seems to work

From this post that describes the same issue, though he traces it to an IIS issue
http://joseph.randomnetworks.com/archives/2004/10/01/making-ie-accept-fi...

There were a lot of great comments in the post, and it seems that it is an IE issue. The fix that works for me is to add 2 headers, before the other 2 headers before outputting the file. (sorry, not very clear).

There are 2 changes to make

In the webform_export.inc file...

The function below is found in the class named webform_exporter_delimited

  function set_headers($filename) {
    parent::set_headers($filename);

    // Convert tabs.
    if ($this->delimiter == "\t") {
      $extension = 'tsv';
      $content_type = 'text/tab-separated-values';
    }
    else {
      $extension = 'csv';
      $content_type = 'text/csv';
    }

    drupal_set_header("Content-type: $content_type");
    drupal_set_header("Content-Disposition: attachment; filename=$filename.$extension");
  }

The function below is found in the class named webform_exporter_excel

  function set_headers($filename) {
    drupal_set_header("Content-Type: application/x-msexcel");
    drupal_set_header("Content-Disposition: attachment; filename=$filename.xls");
  }

In both cases you should see this:

    drupal_set_header("Content-Type: application/x-msexcel");
    drupal_set_header("Content-Disposition: attachment; filename=$filename.xls");

Change this (by adding two header calls before the existing ones) to:

    drupal_set_header("Pragma: public");
    drupal_set_header("Cache-Control: max-age=0");    
    drupal_set_header("Content-type: $content_type");
    drupal_set_header("Content-Disposition: attachment; filename=$filename.$extension");

This has worked for me so far with limited testing

Back to the post I referenced above, there are a lot of good comments there, but I think you will agree that none of them are quite definitive, so further research is probably warranted.

drupal_set_header("Pragma: public");
drupal_set_header("Cache-Control: max-age=0");

quicksketch’s picture

Please upgrade to Webform 2.6, since I believe this problem has been corrected already.

quicksketch’s picture

hanat’s picture

Thanks for the info. I'll take a look!