php - Export Excel Using Yii -


i new yii. doing scenario export excel option. half way through. values getting populated in necessary field. if empty value present cell in excel gets next column value, there mismatch happening, how perform blank cell in excel export.

    if(!empty($cmapprres)){                         foreach($cmapprres $log){                             $arrdata[$i][]=chtml::encode($log->cm_log_description);                         }                     }                      else //if there no data in log table corresponding column should shown blank. //but not working please suggest option else                     {                      } 

thanks in advance.

this fixed. sorry simple step.

if(!empty($cmapprres)){                         foreach($cmapprres $log){                             $arrdata[$i][]=chtml::encode($log->cm_log_description);                         }                     }                      else                     { $arrdata[$i][]="";                     } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -