src/sb/Excel/Workbook.php
public function addStyle($name, $properties)
    {
        $style = $this->createElement('ss:Style');
        $style->setAttribute('ss:ID', $name);
        $this->styles->appendChild($style);
        $font = $this->createElement('ss:Font');
        $style->appendChild($font);
        foreach($properties as $prop=>$val){
            $font->setAttribute('ss:'.$prop, $val);
        }
        return $style;
    }
public function addStyle($name, $properties)
    {
        $style = $this->createElement('ss:Style');
        $style->setAttribute('ss:ID', $name);
        $this->styles->appendChild($style);
        $font = $this->createElement('ss:Font');
        $style->appendChild($font);
        foreach($properties as $prop=>$val){
            $font->setAttribute('ss:'.$prop, $val);
        }
        return $style;
    }
public function addStyle ( $ name , $ properties ) { $ style = $ this -> createElement ( 'ss:Style' ) ; $ style -> setAttribute ( 'ss:ID' , $ name ) ; $ this -> styles -> appendChild ( $ style ) ; $ font = $ this -> createElement ( 'ss:Font' ) ; $ style -> appendChild ( $ font ) ; foreach ( $ properties as $ prop => $ val ) { $ font -> setAttribute ( 'ss:' . $ prop , $ val ) ; } return $ style ; }
Creates a new style node and adds it to the styles section
@param string $name The name of the style, used when assigning it
@param array $properties http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx#odc_xmlss_ss:font  e.g. Array('Color' => '#FF0000', 'Bold' => 1);
@return DOMElement The Style tag itself
Creates a new style node and adds it to the styles section