0

I am creating an Excel with PhpSpreadsheet (no prob with that). I am working with MVC pattern so the flow is :

  1. User press download button and call function in controller
  2. function in controller call a function in an helpers to create the excel

Now it's a very very long task and I would like to show the progress of this long task (like a download bar). I have tried with all things that I know (ajax polling , iframe, sse, session variable, static variable) but none seem to work.

Could you help me ?

The problem is that if for example I use echo in the middle of the process, it will collide with the header of the excel created. I have tried also with header_remove() but it does not work.

Martin Evans
  • 45,791
  • 17
  • 81
  • 97
dack funk
  • 43
  • 6
  • 1
    Could you please post a code sample illustrating what you have tried so far and where specifically you are experiencing issues? – Marcus May 10 '19 at 09:01
  • [this](https://github.com/indeshan/downloader_with_progressbar) may help. Thanks! – Shanteshwar Inde May 10 '19 at 09:47
  • What are you using for the front-end? A possible solution would be to use a websocket to transfer the status of your export. – Rings May 10 '19 at 09:50

0 Answers0