I have an Excel file which uses the default tables in Excel to create a variety of styles including row striping (conditional formatting), filters, and cell styles. I would like to be able to duplicate this report (and several others) using PHPExcel in our web framework.
Can someone tell me the commands (or series of commands) that would allow me to dump all the styling and filtering data and graphs for cells of the sheet so I can find the right colors for striping and settings for the row header?
I've seen this question (PHPexcel cannot reads styles from xls) and got started with this from the example code of PHPExcel and the results of the question above:
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
date_default_timezone_set('Europe/London');
/** Include PHPExcel_IOFactory */
require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
$objPHPExcel = PHPExcel_IOFactory::load("sample.xlsx");
echo '<pre>';
print_r($objPHPExcel->getActiveSheet()->getStyle('B2'));
echo '</pre>';
but that outputs a massive amount of data (including the contents of every cell in the sheet) and when used on the header row (eg cell B1) which is bold doesn't seem to indicate bold.
My sample excel sheet that I would like to duplicate style from is located here: http://klingman.us/sample.xlsx Obviously, this is not really our data, I just got some sample data online to put in a sheet so the number of rows and columns would differ for us.