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
Post a Comment