Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 109
  • Last Modified:

Could you point the way on how to configure all the lines of a column by using PHPExcel with a numerical format?

Hi Experts

Could you point the way on how to configure all the lines of a column by using  PHPExcel with a numerical format?


This runs with a defined number of lines.
$objPHPExcel->getActiveSheet()->getStyle('AD2:....')->getNumberFormat()->setFormatCode('#,##0.00');

Open in new window


Column AD2
img001
The number of lines of AD2 are unknown.

Thanks in advance
0
Eduardo Fuerte
Asked:
Eduardo Fuerte
  • 2
1 Solution
 
Eduardo FuerteAuthor Commented:
Solved with:

This give the total number of lines:
 $linhas = $objPHPExcel->setActiveSheetIndex(0)->getHighestRow();
$objPHPExcel->getActiveSheet()->getStyle('AD2:AD'.$linhas)->getNumberFormat()->setFormatCode('#,##0.00');

Open in new window

0
 
Eduardo FuerteAuthor Commented:
This solves.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now