PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of Timothy Edwards   PHP Excel to HTML   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Excel to HTML
Convert an Excel spreadsheet to HTML
Author: By
Last change:
Date: 2 days ago
Size: 462 bytes
 

Contents

Class file image Download
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>

<body>
<?php
require_once('excelphp.php');
$rt = new ExcelPHP(false);
$text = $rt->readDocument('sample.xlsx','');
echo
$text;
// The following two lines are optional if required to save the html text to a file (xlfile.php)
$myfile = fopen("xlfile.php", "w") or die("Unable to open file!");
fwrite($myfile, $text);
?>
</body>