Home >Backend Development >PHP Tutorial >php ExcelReader reads Excel class_PHP tutorial

php ExcelReader reads Excel class_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:04:491050browse

php ExcelReader reads Excel class /* This is an open source php code. ExcelReader is professional for reading and writing excel tables. Let’s take a look at an example of ExcelReader reading bKjia.c0m.xls worksheet.

php tutorial excelreader reading excel class
/*
This is an open source PHP code. Excelreader is a professional tool for reading and writing excel tables. Let’s take a look at an example of excelreader reading the bKjia.c0m.xls worksheet.
*/

$allow_url_override = 1; // set to 0 to not allow changed via post or get
if(!$allow_url_override || !isset($file_to_include))
{
$file_to_include = "bKjia.c0m.xls";
}
if(!$allow_url_override || !isset($max_rows))
{
$max_rows = 0; //use 0 for no max
}
if(!$allow_url_override || !isset($max_cols))
{
$max_cols = 5; //use 0 for no max
}
if(!$allow_url_override || !isset($debug))
{
$debug = 0; //1 for on 0 for off
}
if(!$allow_url_override || !isset($force_nobr))
{
$force_nobr = 1; //force the info in cells not to wrap unless stated explicitly (newline)
}

require_once 'www.bKjia.c0m/reader.php';
$data = new spreadsheet_excel_reader();
$data->setoutputencoding('cpa25a');
$data->read($file_to_include);
error_reporting(e_all ^ e_notice);
echo "

";
function make_alpha_from_numbers($number)
{
 $numeric = "abcdefghijklmnopqrstuvwxyz";
 if($number  {
  return $numeric[$number];
 }
 else
 {
  $dev_by = floor($number/strlen($numeric));
  return "" . make_alpha_from_numbers($dev_by-1) . make_alpha_from_numbers($number-($dev_by*strlen($numeric)));
 }
}
echo "";
echo "


";
for($sheet=0;$sheetsheets);$sheet++)
{
 echo "
";
}

echo
"

";
echo "
onmousedown="change_tabs($sheet);">", $data->boundsheets[$sheet]['name'] , "

www.bKjia.c0m

";
//echo "";
/*
echo "
";<br>
print_r($data);<br>
echo "
";
*/

//You can download the excelreader class from the official website.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630828.htmlTechArticlephp ExcelReader reads Excel class/* This is an open source php code, ExcelReader is a professional excel table processing For reading and writing operations, let’s take a look at the work of an ExcelReader to read 111cn.net.xls...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn