Phpexcel writing skills

Source: Internet
Author: User
Phpexcel coding skills: PHPcode $ objActSheet-& gt; setCellValue ('A2 ', 26); & nbsp; but my cell is a variable value, that is, a1, b2, c4, unknown, the two variable control areas, $ r represents rows, such as a, B, c, d ..... $ c: phpexcel writing skills
PHP code
  $objActSheet->setCellValue('A2', 26);

But my cell is a variable value, that is, a1, b2, c4, unknown, the control areas of the two variables,
$ R indicates a, B, c, d .....
$ C indicates a column, such as 1, 2, 3, 4,
Values to be put when they are combined.
PHP code
  $objActSheet->setCellValue($r.$c, $r['value']);


An error is reported. when I write it like this, there will be no error.
PHP code
  $objActSheet->setCellValue('a4', $r['value']); 

It seems that the variable has not been processed properly. how can this problem be solved ??

------ Solution --------------------
Control column. Column is the name of the field to be exported.
------ Solution --------------------
What are the errors?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.