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

user3120521 picture user3120521 · Jan 9, 2014 · Viewed 12.2k times · Source

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

Answer

Mark Baker picture Mark Baker · Jan 9, 2014

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