Rumah  >  Artikel  >  pembangunan bahagian belakang  >  phpexcel编写技巧,该如何处理

phpexcel编写技巧,该如何处理

WBOY
WBOYasal
2016-06-13 10:20:18775semak imbas

phpexcel编写技巧

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$objActSheet->setCellValue('A2', 26);
 
但是我的单元格是一个变化的值,即a1,b2,c4,未知,那二个变量控制区,
$r代表行,如:a,b,c,d.....
$c代表列,如1,2,3,4,
二者合在一起来定要放的值。
PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$objActSheet->setCellValue($r.$c, $r['value']);
 

报错误,我这样写时,便无错
PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$objActSheet->setCellValue('a4', $r['value']); 

看来,是变量未处理好,请问如何解决啊??

------解决方案--------------------
控制列就可以。列就是你的需要导出的字段名称。
------解决方案--------------------
什么错误?
Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn