<?php

namespace Modules\Consultation\Controller;

use Modules\Consultation\Service\ExportExcelService;
use Skeleton\Controller\Controller;

class ExportExcelController extends Controller
{
    public function generateExcelAction() : string
    {
        $idForm = $this->request->getAttribute('idForm');

        $exportExcelService = new ExportExcelService($this->pdo, $idForm, $this->getTranslationService());
        $fileName = $exportExcelService->generateExcel();

        return $fileName;
    }
}
