I'm using the follow code segment to export some data to Excel:
header("Content-Type: application/ms-excel");
header("Content-Disposition: attachment; filename=exported_data.xls");
Everything appears to be working okay. However, I have to click "Open" two times before Excel launches and the data is inserted. Any ideas why this is happening?
Thanks in advance,
EJ