cannot retrieve a column value = 'X' or 'x'

Aug 27, 2009 at 2:30 AM

I have this code that supposed retreive a column value but I noticed that the getValue() cannot retreive the column value if the content is 'X' or 'x'
Is this a bug?

Here's my simple code:



Aug 27, 2009 at 1:57 PM

It sounds a very odd error.

I've just run a quick test using the following:



/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . 'Classes/');

/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Worksheet Bug Test</title>



$fileType = 'Excel5';
$fileName = 'bugTest.xls';

echo date('H:i:s')." Load Tests from $fileType file<br />\n";
$callStartTime = microtime(true);

$objPHPExcel = PHPExcel_IOFactory::load($fileName);

$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
echo '<br />Call time to read Workbook was '.sprintf('%.4f',$callTime)." seconds<br />\n";
// Echo memory usage
echo date('H:i:s').' Current memory usage: '.(memory_get_usage(true) / 1024 / 1024)." MB<br /><hr />\n";

echo date('H:i:s')." Test Values<br />\n";
$sheet = $objPHPExcel->getActiveSheet();

$cell = 'A1';
$cellValue = $sheet->getCell($cell)->getValue();
echo '<b>'.$cell.' Value is </b>'.$cellValue."<br />\n";

// Echo memory peak usage
echo date('H:i:s').' Peak memory usage: '.(memory_get_peak_usage(true) / 1024 / 1024).' MB<br />';



and it works exactly as expected

13:52:00 Load Tests from Excel5 file

Call time to read Workbook was 0.4528 seconds
13:52:00 Current memory usage: 8.75 MB

13:52:00 Test Values
A1 Value is X
13:52:00 Peak memory usage: 8.75 MB