This matters wherever the filesystem is awkward: read-only containers, Lambda’s ephemeral storage, or any web server where writing a temp file means cleaning it up afterwards.
That long media type is the correct one for .xlsx. Serving application/vnd.ms-excel instead, which is the older .xls type, makes some browsers mislabel the download.
Jetxl holds the entire workbook in memory before returning it. For a million-row sheet that’s on the order of a gigabyte during generation, which is fine on a server and potentially fatal in a small Lambda. Write to a file for very large exports, or split the work.