Solved

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

Posted on 2016-11-10
2
50 Views
Last Modified: 2016-11-17
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
Comment
Question by:Eduardo Fuerte
  • 2
2 Comments
 

Accepted Solution

by:
Eduardo Fuerte earned 0 total points
ID: 41882697
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
 

Author Closing Comment

by:Eduardo Fuerte
ID: 41891305
This solves.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now