php - Identify & delete Blank sheets -


i using phpexcel generate xls files. doing right is....

  1. create sheets z
  2. loop through members in site , first character of firstname
  3. using first character decide sheet index , activate sheet.
  4. then append users name , add related analytic data in it.

now want remove sheets not have data.

how find sheets blank?

you'll have loop through cells in each sheet testing each in turn, because phpexcel doesn't provide built-in method test if sheet blank

but why not create sheets when need create sheet, lot more efficient creating set of sheets @ start of script, , (at end) deleting haven't used

1. loop through members in site , first character of firstname 2. using first character, test if sheet need exists      - create if necessary 3. append users name , add related analytic data in it. 

if members looped in alphabetic order, don't need reorder sheets when you've finished


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -