On Tue, Aug 28, 2012 at 5:56 PM, admin <admin@xxxxxxxxxxxxxxxxxxx> wrote: > I am exporting to a XLS file and the file does export, but when I open the > file Microsoft is giving a Excel Security Notice. > > I am sure there is something in the header that is missing or causing this > problem. > > > > header("Pragma: public"); > > header("Expires: 0"); > > header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); > > header("Content-Type: application/force-download"); > > header("Content-Type: application/octet-stream"); > > header("Content-Type: application/download"); > > header("Content-Disposition: attachment;filename=list.xls"); > > header("Content-Transfer-Encoding: binary "); > > > > I use pack() to write the labels, Numbers, data. If that could be the > culprit. > > echo pack("sssss", 0x203, 14, $Row, $Col, 0x0); > > echo pack("d", $Value); > > I am running 5.2 on PHP and opening the document with 2010 Office on > Windows. I believe that's normal, and that it does that with any document downloaded from the web. I'm not sure if there's a workaround, but you should not ask that here but on a Microsoft Office forum/list, or just ask the question to Microsoft themselves. - Matijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php