You could use the promise accessible via the pdfExport event to show back the column after the document is exported. Similar to the following:
The solution is working fine for PDF. But it is not working for excel.
Can you provide the solution to hide the columns while export to excel as well.
A possible way to hide columns during Excel export is discussed in this forum. Please give it a try and see if this helps.