From dae529615ef3933af641910b54b68bc4473d5e7c Mon Sep 17 00:00:00 2001 From: alexgann Date: Fri, 10 Aug 2012 21:34:39 -0300 Subject: [PATCH] Add cell indent to html rendering Quick one-liner to render cell indents in html as padding. 9px seems to be what Excel uses internally --- Classes/PHPExcel/Writer/HTML.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Classes/PHPExcel/Writer/HTML.php b/Classes/PHPExcel/Writer/HTML.php index 335dcd0e..5ce2b8c4 100644 --- a/Classes/PHPExcel/Writer/HTML.php +++ b/Classes/PHPExcel/Writer/HTML.php @@ -782,6 +782,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter { $css['vertical-align'] = $this->_mapVAlign($pStyle->getVertical()); if ($textAlign = $this->_mapHAlign($pStyle->getHorizontal())) { $css['text-align'] = $textAlign; + if(in_array($textAlign,array('left','right'))) $css['padding-'.$textAlign] = (string)((int)$pStyle->getIndent() * 9).'px'; } // Return