blob: ddea66e38ce5e92c112d78f340fb2a49a230058b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<?php
include_once('../../settings.php');
include_once('../../function.php');
//include_once('class.xls.php');
include_once('../../vendor/autoload.php');
class xls {
private $xls_string = '';
private $row = 0;
private $col = 0;
private $filename = '';
function __construct($filename = false) {
if ($filename) {
$this->filename = $this->check_extension($filename);
} else {
$this->filename = 'XLS_download_' . date('dmY') . '.xls';
}
}
function display($filename, $output) {
header('Content-type: application/vnd.ms-excel; charset=windows-1250');
header('Content-Disposition: attachment; filename="'.$filename.'"');
echo $output;
exit;
}
}
?>
|