public static function simple( array $rows = [], array $totals = [], string $sheetName = 'worksheet', string $path = '', array $options = [] ) {
        try {

            /**
             * @var Spreadsheet $spreadsheet
             */
            $spreadsheet = new Spreadsheet();
            $path        = self::getUniqueFilePath( $path );
            self::initializeFile( $path );
            self::setOptions( $spreadsheet, $options );
            self::setOrientationLandscape( $spreadsheet );
            self::setHeaderRow( $spreadsheet, $rows );
            self::setRows( $spreadsheet, $rows );
            self::setFooterTotals( $spreadsheet, $totals );
            self::setWorksheetTitle( $spreadsheet, $sheetName );
            self::writeSpreadsheet( $spreadsheet, $path );
        } catch ( \Exception $e ) {
            throw $e;
        }

        return $path;
    }
public static function simple( array $rows = [], array $totals = [], string $sheetName = 'worksheet', string $path = '', array $options = [] ) {
        try {

            /**
             * @var Spreadsheet $spreadsheet
             */
            $spreadsheet = new Spreadsheet();
            $path        = self::getUniqueFilePath( $path );
            self::initializeFile( $path );
            self::setOptions( $spreadsheet, $options );
            self::setOrientationLandscape( $spreadsheet );
            self::setHeaderRow( $spreadsheet, $rows );
            self::setRows( $spreadsheet, $rows );
            self::setFooterTotals( $spreadsheet, $totals );
            self::setWorksheetTitle( $spreadsheet, $sheetName );
            self::writeSpreadsheet( $spreadsheet, $path );
        } catch ( \Exception $e ) {
            throw $e;
        }

        return $path;
    }
public static function simple ( array $ rows = [ ] , array $ totals = [ ] , string $ sheetName = 'worksheet' , string $ path = '' , array $ options = [ ] ) { try { /**
             * @var Spreadsheet $spreadsheet
             */ $ spreadsheet = new Spreadsheet ( ) ; $ path = self :: getUniqueFilePath ( $ path ) ; self :: initializeFile ( $ path ) ; self :: setOptions ( $ spreadsheet , $ options ) ; self :: setOrientationLandscape ( $ spreadsheet ) ; self :: setHeaderRow ( $ spreadsheet , $ rows ) ; self :: setRows ( $ spreadsheet , $ rows ) ; self :: setFooterTotals ( $ spreadsheet , $ totals ) ; self :: setWorksheetTitle ( $ spreadsheet , $ sheetName ) ; self :: writeSpreadsheet ( $ spreadsheet , $ path ) ; } catch ( \ Exception $ e ) { throw $ e ; } return $ path ; }
A wrapper around the PhpSpreadsheet library to make consistently formatted spreadsheets.

@param array $rows
@param array $totals
@param string $sheetName
@param string $path
@param array $options

@return string
@throws \Exception
A wrapper around the PhpSpreadsheet library to make consistently formatted spreadsheets .