public static function newSpreadsheet($phpSpreadsheet=NULL)
    {
        if (is_object($phpSpreadsheet)) {
            
            self::$_objSpreadsheet = &$phpSpreadsheet;
        } 
        elseif (is_string($phpSpreadsheet)) {

            self::$_objSpreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($phpSpreadsheet);
        }
        else {
            self::$_objSpreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
        }
        
        return self::resetSheet();
    }
public static function newSpreadsheet($phpSpreadsheet=NULL)
    {
        if (is_object($phpSpreadsheet)) {
            
            self::$_objSpreadsheet = &$phpSpreadsheet;
        } 
        elseif (is_string($phpSpreadsheet)) {

            self::$_objSpreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($phpSpreadsheet);
        }
        else {
            self::$_objSpreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
        }
        
        return self::resetSheet();
    }
public static function newSpreadsheet ( $ phpSpreadsheet = NULL ) { if ( is_object ( $ phpSpreadsheet ) ) { self :: $ _objSpreadsheet = & $ phpSpreadsheet ; } elseif ( is_string ( $ phpSpreadsheet ) ) { self :: $ _objSpreadsheet = \ PhpOffice \ PhpSpreadsheet \ IOFactory :: load ( $ phpSpreadsheet ) ; } else { self :: $ _objSpreadsheet = new \ PhpOffice \ PhpSpreadsheet \ Spreadsheet ( ) ; } return self :: resetSheet ( ) ; }
New or load an PhpSpreadsheet object

@param object|string $phpSpreadsheet PhpSpreadsheet object or filepath
@return self
New or load an PhpSpreadsheet object