function __construct( $xls_fname = null ) { if ( is_string( $xls_fname ) ) { # create special "default" format key/val to avoid extra "if" logic: self::$format = array( 'null' => null ); self::$wb = new Spreadsheet_Excel_Writer_Workbook( $xls_fname ); self::$wb->setVersion( 8 ); self::$ws = self::$wb->addworksheet(); self::$ws->setInputEncoding( 'utf-8' ); self::$ws->setPaper( 9 ); } }