// fclose($fp); $data = array(); $row = array(); $row[] = 'Original'; $row[] = 'nl'; $row[] = 'en'; $style = array_fill(0, 2, '-btbac'); $data[] = implode('|', $style); $data[] = $row; foreach( $all as $original => $translation ){ $row = array(); $row[] = $original; $row[] = $translation; $row[] = ''; $data[] = $row; } set_include_path( get_include_path() . PATH_SEPARATOR . dirname(dirname(__FILE__)) . "/library/"); function __autoload($class){ require_once str_replace('_', '/', $class . '.php'); } ini_set('error_reporting', 'On'); ini_set('display_errors', 'On'); error_reporting(E_ALL); $excel = Export::excelCreate($data); Export::excelOutput($excel, 'translation', 'xlsx');