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
102 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

623 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