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

phpexcel编写技巧,该如何处理

WBOY
Release: 2016-06-13 13:33:24
Original
962 people have browsed it

phpexcel编写技巧

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->$objActSheet->setCellValue('A2', 26);
Copy after login
 
但是我的单元格是一个变化的值,即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']);
Copy after login
 

报错误,我这样写时,便无错
PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->$objActSheet->setCellValue('a4', $r['value']); 
Copy after login

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

------解决方案--------------------
控制列就可以。列就是你的需要导出的字段名称。
------解决方案--------------------
什么错误?
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template