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
85 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

830 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