in reply to Re: Dancer and Excel::Writer::XLSX incompatibility?
in thread Dancer and Excel::Writer::XLSX incompatibility?

That would not explain, why the test I posted works.

And the documentation states:

If you have your data in a scalar variable, send_file can be useful as well. Pass a reference to that scalar, and send_file will behave as if there was a file with that contents

P.S.: I also tried working with a temporary file. It was the same result. Both, the file downloaded and the temporary one on the server, were corrupt.


SOLVED!

binmode($fh);

It seems my Dancer application is injecting some CR/LF otherwise...

Thanks for looking into it!


s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e