目前我尝试将此 PHP 电子表格包用于 Symfony 4: https ://github.com/roromix/SpreadsheetBundle
但是我尝试使用这个捆绑包没有成功。找不到它作为服务(php bin/console debug:autowiring),下面的方法也是错误的。
<?php
namespace App\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Roromix\Bundle\SpreadsheetBundle\RoromixSpreadsheetBundle;
class TranslationController extends Controller
{
/**
* @Route("/")
*/
public function index()
{
$RoromixSpreadsheetBundle = new RoromixSpreadsheetBundle();
//...
}
}
?>