...*actually* a CSV-format file -- but by giving it the .XLS file-name extension, you get Windows/Explorer/Internet Explorer to have Excel open it by default, and then you let that figure out the actual format of the file.

Can't be sure, though; it *could* be that we used some special export-to-Excel package that built a real actual Excel file... I dunno, it was a while ago, and I only copied-and-modified a colleague's code.

Oh, and we only built the file if they really tried to download it. The URL pointed to a PL/SQL procedure that, when they clicked the URL / invoked the procedure, built a file for them.

IIRC.