I am using phpexcel library. but when I want to set the font color, and different style for a cell value then when I export my file then those changes not applied there. my code is below
<?php
require_once (SPEE_PLUGIN_DIRS . "/Classes/PHPExcel.php");
require_once (SPEE_PLUGIN_DIRS . "/Classes/PHPExcel/IOFactory.php");
$objPHPExcel = new PHPExcel();
$styleArray = array(
'font' => array(
'bold' => true,
'color' => array('rgb' => 'FF0000'),
'size' => 15,
'name' => 'Verdana'
));
$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->setActiveSheetIndex(0)->mergeCells('A1:H1');
$objPHPExcel->setActiveSheetIndex(0)->mergeCells('A2:H2');
$objPHPExcel->setActiveSheetIndex(0)->mergeCells('A3:H3');
$objPHPExcel->setActiveSheetIndex()->getStyle('E1')->applyFromArray(array("font" => array( "bold" => true))); // font not set bold.
$objPHPExcel->getActiveSheet()->setCellValue('E1', 'my data');
$objPHPExcel->getActiveSheet()->getCell('A7')->setValue('CNIC No');
$objPHPExcel->getActiveSheet()->getStyle('A7')->applyFromArray($styleArray); // this style array not work on 'A7'
?>