public static function xlsx($input, array $keys = [], $header = true)
    {
        $input = self::transformInput($input);

        $array = self::generateContentArray($input, $keys, $header);

        $writer = new XLSXWriter();
        $writer->writeSheet($array);

        return $writer->writeToString();
    }
public static function xlsx($input, array $keys = [], $header = true)
    {
        $input = self::transformInput($input);

        $array = self::generateContentArray($input, $keys, $header);

        $writer = new XLSXWriter();
        $writer->writeSheet($array);

        return $writer->writeToString();
    }
public static function xlsx ( $ input , array $ keys = [ ] , $ header = true ) { $ input = self :: transformInput ( $ input ) ; $ array = self :: generateContentArray ( $ input , $ keys , $ header ) ; $ writer = new XLSXWriter ( ) ; $ writer -> writeSheet ( $ array ) ; return $ writer -> writeToString ( ) ; }
Export an Array or ActiveQuery instance into a Excel formatted string.

@param array|ActiveQueryInterface $input
@param array $keys Defines which keys should be packed into the generated xlsx. The defined keys does not change the sort behavior of the generated xls.
@param bool $header
@return mixed
@throws Exception
@since 1.0.4
Export an Array or ActiveQuery instance into a Excel formatted string .