Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.15.186.27
<?php
// Test CVS
$main_src_obj=(explode("/",$_SERVER["REQUEST_URI"]));
$main_src=$main_src_obj[1];
$reader_path=$_SERVER["DOCUMENT_ROOT"]."/".$main_src."/Excel_reader/reader.php";
$excel_source_file=$_SERVER["DOCUMENT_ROOT"]."/".$main_src."/imported_files/jxlrwtest.xls";
require_once $reader_path;
$data = new Spreadsheet_Excel_Reader();
$data->setOutputEncoding('CP1251');
$data->read($excel_source_file);
error_reporting(E_ALL ^ E_NOTICE);
echo "<pre>";
var_dump($data->sheets[0]);
for ($i = 2; $i <= $data->sheets[0]['numRows']; $i++) {
for ($j = 1; $j <= $data->sheets[0]['numCols']; $j++) {
echo "\"".$data->sheets[0]['cells'][$i][$j]."\",";
}
echo "\n";
}
?>
|