-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathsample4.php
43 lines (29 loc) · 963 Bytes
/
sample4.php
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
36
37
38
39
40
41
42
43
<?php
include_once('class/tcpdf/tcpdf.php');
include "class/PHPJasperXML.inc.php";
// Creating a workbook
include ('setting.php');
//$xml = simplexml_load_file("sample9.jrxml");
$xml = simplexml_load_file("sample4.jrxml");
$PHPJasperXML = new PHPJasperXML("en","XLS");
//$PHPJasperXML->debugsql=true;
$PHPJasperXML->arrayParameter=array("parameter1"=>0);
$PHPJasperXML->xml_dismantle($xml);
$PHPJasperXML->transferDBtoArray($server,$user,$pass,$db);
$PHPJasperXML->outpage("I","sample9.xls"); //page output method I:standard output D:Download file
/*
// sending HTTP headers
// Creating a worksheet
// The actual data
$worksheet->write(0, 0, 'Name');
$worksheet->write(0, 1, 'Age');
$worksheet->write(1, 0, 'John Smith');
$worksheet->write(1, 1, 30);
$worksheet->write(2, 0, 'Johann Schmidt');
$worksheet->write(2, 1, 31);
$worksheet->write(3, 0, 'Juan Herrera');
$worksheet->write(3, 1, 32);
// Let's send the file
$workbook->close();
*/
?>