Hide all Columns beyond I

Topics: User Forum
Apr 15, 2011 at 10:27 AM

HI,

 

How would it be possible to hide every columns beyond "I". Or Only show columns A -> I in the created File?

 

Rgds

Chris

Coordinator
Apr 19, 2011 at 8:31 PM

If you had to do this:

for ($col = 'J'; $col != 'IU'; $col++)
   $objPHPExcel->getActiveSheet()->getColumnDimension($col)->setVisible(false);

for an Excel5 worksheet, or use $col != 'XFE'; as the loop limit for an Excel2007 worksheet

But it's not something I'd really recommend doing... I wouldn't even do it if I was creating a file in MS Excel itself.