PHP Classes

File: test/test_excel_browser.php

Recommend this page to a friend!
  Classes of Ionut-Alexandru Toma   PHP Export Data   test/test_excel_browser.php   Download  
File: test/test_excel_browser.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Export Data
Export data in CSV, TSV, or Excel XML formats
Author: By
Last change:
Date: 7 years ago
Size: 488 bytes
 

Contents

Class file image Download
<?php

require "../php-export-data.class.php";

$excel = new ExportDataExcel('browser');
$excel->filename = "test.xml";

$data = array(
    array(
1,2,3),
    array(
"asdf","jkl","semi"),
    array(
"1273623874628374634876","=asdf","10-10"),
    array(
"2010-01-02 10:00AM","1/1/11","10-10"),
    array(
"1234","12.34","-123."),
    array(
"-12345678901234567890","0.0000000000123456789","-"),
);

$excel->initialize();
foreach(
$data as $row) {
   
$excel->addRow($row);
}
$excel->finalize();