In case that the pdf or excel you download is null you have to add -->setC

In case that the pdf or excel you download is null you have to
add -->setContainerToBeExported(your_container)
and be carefull dont call exporter unless you are in the end of your file