Home  >  Article  >  Backend Development  >  phpexcel编写技巧,该如何处理

phpexcel编写技巧,该如何处理

WBOY
WBOYOriginal
2016-06-13 13:33:24950browse

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']); 

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

------解决方案--------------------
控制列就可以。列就是你的需要导出的字段名称。
------解决方案--------------------
什么错误?
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn