Cell 无效的单元格坐标phpExcel
我已经测试过,如果使用vlookup在自我工作表中搜索“=vlookup(h2,A2:B2000,2,False)”和从其他工作表返回的值“=SupplierList!A2”和“=vlookup(SupplierList!H3,A2:B2000,2,False)”也可以 那么为什么只有“=vlookup(h3,供应商列表!A2:B2000,2,False)”驱动器出错 ---------------------------错误消息-------------------------------Cell 无效的单元格坐标phpExcel,cell,phpexcel,coordinate,Cell,Phpexcel,Coordinate,我已经测试过,如果使用vlookup在自我工作表中搜索“=vlookup(h2,A2:B2000,2,False)”和从其他工作表返回的值“=SupplierList!A2”和“=vlookup(SupplierList!H3,A2:B2000,2,False)”也可以 那么为什么只有“=vlookup(h3,供应商列表!A2:B2000,2,False)”驱动器出错 ---------------------------错误消息------------------------------- 致
致命错误:未捕获异常“exception”,消息为“PO!G2->C:\Program Files\EasyHP-5.3.6.0\www\ExcelImporter\Classes\PHPExcel\cell.php:288堆栈跟踪:0 C:\Program Files\EasyHP-5.3.6.0\www\ExcelImporter\Classes\phpexcell\cell.php(204):phpexcell\cell->getCalculatedValue()\1 C:\Program Files\EasyHP-5.3.6.0\www\ExcelImporter\Documentation\Examples\index.php(36):phpexcell_Cell->getFormattedValue()#2{main}在第288行的C:\Program Files\EasyHP-5.3.6.0\www\ExcelImporter\Classes\PHPExcel\Cell.php中抛出
---------------------------错误消息-------------------------------
这个细胞的公式是这样的
**=IF(iSeries错误(VLOOKUP(H2349,'Supplier List'!A:B,2,FALSE)),“-”,VLOOKUP(H2349,'Supplier List'!A:B,2,FALSE))**
太长,无法作为注释
调试计算错误时,我使用以下方法:
function testFormula($sheet,$cell) {
$formulaValue = $sheet->getCell($cell)->getValue();
echo '<b>'.$cell.' Value is </b>'.$formulaValue."<br />\n";
$expectedValue = $sheet->getCell($cell)->getOldCalculatedValue();
echo '<b>'.$cell.' Expected Value is </b>'.((!is_null($expectedValue)) ? $expectedValue : 'UNKNOWN')."<br />\n";
$calculate = false;
try {
$tokens = PHPExcel_Calculation::getInstance()->parseFormula($formulaValue,$sheet->getCell($cell));
echo '<b>Parser Stack :-</b><pre>';
print_r($tokens);
echo '</pre>';
$calculate = true;
} catch (Exception $e) {
echo "PARSER ERROR: ".$e->getMessage()."<br />\n";
echo '<b>Parser Stack :-</b><pre>';
print_r($tokens);
echo '</pre>';
}
if ($calculate) {
try {
$cellValue = $sheet->getCell($cell)->getCalculatedValue();
echo '<b>'.$cell.' Calculated Value is </b>'.$cellValue."<br />\n";
echo '<h3>Evaluation Log:</h3><pre>';
print_r(PHPExcel_Calculation::getInstance()->debugLog);
echo '</pre>';
} catch (Exception $e) {
echo "CALCULATION ENGINE ERROR: ".$e->getMessage()."<br />\n";
echo '<h3>Evaluation Log:</h3><pre>';
print_r(PHPExcel_Calculation::getInstance()->debugLog);
echo '</pre>';
}
}
}
$sheet = $objPHPExcel->getActiveSheet();
PHPExcel_Calculation::getInstance()->writeDebugLog = true;
testFormula($sheet,'A4');
para resolver-esse问题“无效单元坐标”$this->caracteres=array(
‘A’、‘B’、‘C’、‘D’、‘E’、‘F’、‘G’、‘H’、‘I’、‘J’、‘K’、‘L’、‘M’,
“N”、“O”、“P”、“Q”、“R”、“S”、“T”、“U”、“V”、“X”、“Y”、“W”、“Z”,
‘AA’、‘AB’、‘AC’、‘AD’、‘AE’、‘AF’、‘AG’、‘AH’、‘AI’、‘AJ’、‘AK’、‘AL’、‘AM’,
‘AN’、‘AO’、‘AP’、‘AQ’、‘AR’、‘AS’、‘AT’、‘AU’、‘AV’、‘AX’、‘AY’、‘AW’、‘AZ’
adicione mais caracteres,
‘AA’、‘AB’、‘AC’、‘AD’、‘AE’、‘AF’、‘AG’、‘AH’、‘AI’、‘AJ’、‘AK’、‘AL’、‘AM’,
‘AN’、‘AO’、‘AP’、‘AQ’、‘AR’、‘AS’、‘AT’、‘AU’、‘AV’、‘AX’、‘AY’、‘AW’、‘AZ’
英式
要解决此问题,“无效单元格坐标”$this->characters=array(
‘A’、‘B’、‘C’、‘D’、‘E’、‘F’、‘G’、‘H’、‘I’、‘J’、‘K’、‘L’、‘M’,
“N”、“O”、“P”、“Q”、“R”、“S”、“T”、“U”、“V”、“X”、“Y”、“W”、“Z”
“AA”,“AB”,“AC”,“AD”,“AE”,“AF”,“AG”,“AH”,“AI”,“AJ”,“AK”,“AL”,“AM”
‘AN’、‘AO’、‘AP’、‘AQ’、‘AR’、‘AS’、‘AT’、‘AU’、‘AV’、‘AX’、‘AY’、‘AW’、‘AZ’
添加更多字符,
“AA”,“AB”,“AC”,“AD”,“AE”,“AF”,“AG”,“AH”,“AI”,“AJ”,“AK”,“AL”,“AM”
‘AN’、‘AO’、‘AP’、‘AQ’、‘AR’、‘AS’、‘AT’、‘AU’、‘AV’、‘AX’、‘AY’、‘AW’、‘AZ’ 消息表明在计算树的某个地方有一个对单元格“PO!G2”的引用,其中包含一个需要计算的公式。。。那么单元格“PO!G2”的值是多少?
$objWriter->setPreCalculateFormulas(FALSE);