Export Not Working in IE

Discuss MySQL Ajax Table Editor Pro Version

Export Not Working in IE

Postby hexxamillion » Thu Jun 27, 2013 9:08 pm

So I have the same issue when trying to export in IE with Pro version as I did in the free version. So this is what i had to do.

Change this:
Code: Select all
$this->Editor->data['sessionData'] = $_GET['session_data'];
         $this->Editor->setDefaults();
         ob_end_clean();
         header('Cache-Control: no-cache, must-revalidate');
         header('Pragma: no-cache');
         header('Content-type: application/x-msexcel');
         header('Content-Type: text/csv');
         header('Content-Disposition: attachment; filename="'.$this->Editor->tableName.'.csv"');
         // Add utf-8 signature for windows/excel
         echo chr(0xEF).chr(0xBB).chr(0xBF);
         echo $this->Editor->exportInfo();
         exit();


To This:
Code: Select all
$this->Editor->data['sessionData'] = $_GET['session_data'];
         $this->Editor->setDefaults();
         ob_end_clean();
         //header('Cache-Control: no-cache, must-revalidate');
         //header('Pragma: no-cache');
         //header('Content-type: application/x-msexcel');
         //header('Content-Type: text/csv');
         //header('Content-Disposition: attachment; filename="'.$this->Editor->tableName.'.csv"');
          include('export.php');
         echo $this->Editor->exportInfo();
         exit();


I put the actual export config in a separate file so that I only need to modify once rather than on every page. So this is what is in the export.php.

Code: Select all
<?php
   //header("Cache-Control: no-cache, must-revalidate");
   //header("Pragma: no-cache");
   //header("Content-type: application/x-msexcel");
   header("Pragma: ");
   header("Cache-Control: ");
   header("Content-type: application/vnd.ms-excel; name='excel'");
   //header('Content-disposition: attachment; filename="'.$this->Editor->tableName.'.csv"');
   header('Content-disposition: filename="'.$this->Editor->tableName.'.csv"');
   //Add utf-8 signature for windows/excel
   echo chr(0xEF).chr(0xBB).chr(0xBF);
?>
hexxamillion
 
Posts: 100
Joined: Fri Jul 08, 2011 11:36 pm

Return to Pro Version

Who is online

Users browsing this forum: No registered users and 2 guests

cron