Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there anyway in PHPExcel to hide values in an export?

I would like to be able to get the ID of my record in my sql statement:

$result = $db->query("select id,FQDN, ip_address, .....");

However, I don't want it to show up in the export using headings:

$headings = array('Name (FQDN)','Management IP Address', ......");

Is it possible to hide the ID value?
Thanks

like image 483
user3120521 Avatar asked Jan 09 '14 20:01

user3120521


1 Answers

Columns or rows can be set to "HIDDEN"

$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setVisible(false);

will hide column C

or

$objPHPExcel->getActiveSheet()->getRowDimension(5)->setVisible(false);

will hide row 5

like image 78
Mark Baker Avatar answered Oct 16 '22 03:10

Mark Baker