<?php

spl_autoload_register(function($classname) {
    if (0 === strpos($classname, "XLSXExporter")) {
        require_once dirname(__DIR__)."/".str_replace("\\", "/", $classname).".php";
    }
});


<?php

spl_autoload_register(function($classname) {
    if (0 === strpos($classname, "XLSXExporter\\")) {
        require_once dirname(__DIR__)."/XLSXExporter/".str_replace("\\", "/", $classname).".php";
    }
});


Add a '\' after XLSXExporter
Add a '\' after XLSXExporter