[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 113
  • 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

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

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