$objPHPExcel->getActiveSheet()->SetCellValue('L'.CONCATENATE('A','C','D','E','F','G','H','I','J','K'),'0);');
任何人都可以告诉如何在php Excel中使用连接函数吗?
答案 0 :(得分:0)
如果您在单元格中编写公式,则需要像编写Excel公式一样编写公式:
=CONCATENATE("A","C","D","E","F","G","H","I","J","K")
如果我正在阅读您正在尝试正确执行的操作
$objPHPExcel->getActiveSheet()->SetCellValue('A1','=CONCATENATE("A","C","D","E","F","G","H","I","J","K")');
修改强>
试图解释你的意思:
$objPHPExcel->getActiveSheet()->SetCellValue('E'.($i+$j),'=CONCATENATE(A'.($i+$j).'," ",D'.($i+$j).')');
如果$ i + $ j = 5,那么这将写出公式
=CONCATENATE(A5," ",D5)
单元格E5中的,
所以如果单元格A5包含
你好
和单元格D5包含
世界
然后单元格E5将显示值
Hello World