#68 Doesn't handle all hyper-ASCII characters

Mark Tischler

I have an Excel file with an ellipsis (the hyper-ASCII '...' character) in a cell, and when PHP-ExcelReader comes across that cell, the result is an empty string (see attached Excel file which will demonstrate this problem). At minimum, it should simply eliminate this one character and produce the rest.

In addition, there are a few other less-egregious problems I have noticed with the 2007-07-06 release of this software:

1. In reader.php, the line
$this->_ole =& new OLERead();
results in a 'deprecated' error. Removing the ampersand solves this problem.
2. In reader.php, the line
if (preg_match("/[^hmsday\/\-:\s]/i", $formatstr) == 0) { // found day and time format
needs the following line to precede it (otherwise, an error is produced that indicates that the $formatstr variable has no value)
if (isset($formatstr))
3. In reader.php, the line
case 'iconv' : $result = iconv('UTF-16LE', $this->_defaultEncoding, $string);
causes the following error:
iconv() [<a href='function.iconv'>function.iconv</a>]: Wrong charset, conversion from `UTF-16LE' to `CP1251' is not allowed
The code that I use to invoke reader.php on a Solaris 8 machine is as follows:
require_once '.../Spreadsheet/Excel/reader.php';
$data = new Spreadsheet_Excel_Reader();
4. When extracting reader.php and oleread.inc from the zip file (after downloading the software from Sourceforge), I had to move the oleread.inc to OLERead.php, because that is what reader.php requires. The reader.php file also requires OLERead.php to be in a particular directory. It would be nice if there were an installer attached to this software, so that files would get installed with the proper names and in their proper locations.

For #1-3 above, I have the following code that causes these errors to be displayed in my web server's error log:
$STDERR = fopen('php://stderr', 'w+');
function customError($errno, $errstr, $errfile, $errline)
# Set up the way an error should be printed to the error log.

global $STDERR;
$dstamp = date('D M d H:i:s Y');
fwrite($STDERR, "[$dstamp] [error $errno] [client {$_SERVER['REMOTE_ADDR']}] $errstr in $errfile on line $errline\n"); <


  • Mark Tischler
    Mark Tischler

    Excel file which demonstrates that an ellipsis causes no data to be read from the cell