Bizley Sir,
as u say i use it already but still it prints like,'5/6 .
if suppose i give colspan=2 then also it not works in windows machine…
i am attaching my excel file and my action in controller file…and excel view file.
then help me…
this is the issue regarding windows machine…ubuntu it works…
here is my action code in controller file, in which i am generating excel file
/*****************************************/
public function actionStudMonthlyAllsubjectAttendenceReport()
{
$baseUrl = Yii::app()->baseUrl;
$cs = Yii::app()->getClientScript();
$cs->registerCssFile($baseUrl.'/css/report.css');
$model = new Attendence;
$model->scenario = 'studMonthlyAttendenceReport';
$this->performAjaxValidation($model);
$month = $month_value=$query=null;
$student= $subject_data= $sid=$subjectidp=$subjectid=array();
$subject=$subjectp=$sem=$branch=$div=0;
$org_id = Yii::app()->user->getState('org_id');
$status = false;
if(!empty($_POST['Attendence']['att_month']) && !empty($_REQUEST['Attendence']['branch_id']) && !empty($_REQUEST['Attendence']['div_id']) && isset($_POST['Attendence']) || isset($_REQUEST['branch_id']))
{
if(!empty($_REQUEST['branch_id']))
{
$branch = $_REQUEST['branch_id'];
$query .="student_transaction_branch_id=".$branch. " AND ";
}
else
{
$branch =$_POST['Attendence']['branch_id'];
$query .="student_transaction_branch_id=".$branch. " AND ";
}
if(!empty($_REQUEST['sem_name_id']))
{
$sem = $_REQUEST['sem_name_id'];
$query .="student_academic_term_name_id=".$sem. " AND ";
}
else
{
$sem =$_POST['Attendence']['sem_name_id'];
$query .="student_academic_term_name_id=".$sem." AND ";
}
if(!empty($_POST['Attendence']['div_id']))
{
$div = $_POST['Attendence']['div_id'];
$query .="student_transaction_division_id=".$div. " AND ";
}
else
{
$div = $_REQUEST['div_id'];
$query .="student_transaction_division_id=".$div. " AND ";
}
if(!empty($_POST['Attendence']['att_month']) || !empty($_REQUEST['month']))
{
if(!empty($_REQUEST['month']))
{
$month = $_REQUEST['month'];
}
else
{
$month = $_POST['Attendence']['att_month'];
}
$student=Yii::app()->db->createCommand()
->select('student_transaction_id')
->from('student_transaction st')
->join('student_info stud_info', 'stud_info.student_info_transaction_id = st.student_transaction_id')
->where($query.'st.student_transaction_organization_id='.$org_id.' AND st.student_transaction_detain_student_flag NOT IN (1,2) order by stud_info.student_enroll_no ASC')
->queryAll();
foreach($student as $s )
{
$sid[]=$s['student_transaction_id'];
}
$subject=Yii::app()->db->createCommand()
->select('subject_master_id')
->from('subject_master sm')
->where('sm.subject_master_organization_id='.$org_id.' AND sm.subject_master_branch_id='.$branch.' AND sm.subject_master_academic_terms_name_id='.$sem.' AND sm.subject_master_type_id=1')
->queryAll();
$subject_p=Yii::app()->db->createCommand()
->select('subject_master_id')
->from('subject_master sm')
->where('sm.subject_master_organization_id='.$org_id.' AND sm.subject_master_branch_id='.$branch.' AND sm.subject_master_academic_terms_name_id='.$sem.' AND subject_master_type_id=2')
->queryAll();
foreach($subject as $sub)
{
$subjectid[]=$sub['subject_master_id'];
}
foreach($subject_p as $sub)
{
$subjectidp[]=$sub['subject_master_id'];
}
$chk_record = Attendence::model()->findAll(array('condition'=>'month(attendence_date)='.$month.' AND branch_id='.$branch.' AND div_id='.$div.' AND year(attendence_date)='.date('Y')));
if($chk_record)
{
$status = true;
}
if(isset($_REQUEST['excel'])) //export excel
{
Yii::app()->request->sendFile(date('YmdHis').'.xls',
$this->renderPartial('stud_monthly_allsubject_attendence_report_excel',
array(
'month'=>$month,
'sid'=>$sid,
'sem'=>$sem,
'branch'=>$branch,
'subjectid'=>$subjectid,
'subjectidp'=>$subjectidp,
'div'=>$div,
'status'=>$status,
),true));
}
else
{
$this->render('stud_monthly_allsubject_attendence_report_view',array('model'=>$model,'month'=>$month,'sid'=>$sid,'branch'=>$branch,'div'=>$div,'sem'=>$sem,'subjectid'=>$subjectid,'subjectidp'=>$subjectidp,'status'=>$status));
}
} //end month/moths
} //main if
else
{
$this->render('stud_monthly_allsubject_attendence_report_view',array('model'=>$model,'month'=>$month,'sid'=>$sid,'branch'=>$branch,'sem'=>$sem,'div'=>$div,'subjectid'=>$subjectid,'subjectidp'=>$subjectidp,'status'=>$status));
}
}
/***********************************/
Thanks.