phpexcel编写技巧
- PHP code
<!---ecms 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
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$objActSheet->setCellValue($r.$c, $r['value']);
报错误,我这样写时,便无错
- PHP code
<!---ecms Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$objActSheet->setCe<a style="color:transparent">本@文来源gao($daima.com搞@代@#码(网5</a><strong>搞gaodaima代码</strong>llValue('a4', $r['value']);
看来,是变量未处理好,请问如何解决啊??
——解决方案——————–
控制列就可以。列就是你的需要导出的字段名称。
——解决方案——————–
什么错误?