variable column formatting

Topics: User Forum
Sep 18, 2011 at 1:59 AM

You all have been such great help before, so thanks in advance.

I'm trying to have the columns detected dynamically...I know the array bit works but is limited:

$xls->getActiveSheet()->getStyle('A1:J1')->applyFromArray($styleArray);

So what would a loop look like that would detect the number of columns in use?  Columns do have headers in this situation, so the first cell of each column would have data in them.

 

Thanks again,

J

Sep 19, 2011 at 1:00 AM

It also seems that I could use GetHighestColumn() in this instance...is this correct?

Thanks,

J