Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Karl Holz  >  PHP Convert Excel to JSON  >  test.php  >  Download  
File: test.php
Role: Unit test script
Content type: text/plain
Description: value dump - test.php => dumps class values - show how to use excel data without JSON print out - $e->filter_cells() - $e->filter_data()
Class: PHP Convert Excel to JSON
Convert data from Excel spreadsheet to JSON format
Author: By
Last change:
Date: 1 year ago
Size: 488 bytes
 

Contents

Class file image Download
<?php
require_once 'excelMap.class.php';
$e=new excel2JSON();
$e->set_excel($file'false');
$e->load_sheet($sheet);
$e->load_sheet_data();

$e->add_cell_list('A1');

$e->add_cell_list('A2');
$e->add_cell_list('B2');

$e->add_cell_list('A4');
$e->add_cell_list('B4');

echo 
'<h2>Filtered Cells</h2><pre>'.print_r($e->filter_cells(), TRUE).'</pre><hr />';

echo 
'<h2>Filtered Cell Data</h2><pre>'.print_r($e->filter_data(), TRUE).'</pre><hr />';

echo 
'<pre>'.print_r($eTRUE).'</pre>';