Re: [PHP] PHP to XLS Security Alert issue

2012-08-30 Thread Maciek Sokolewicz

On 29-08-2012 19:28, admin wrote:

-Original Message-
From: Matijn Woudt [mailto:tijn...@gmail.com]
Sent: Tuesday, August 28, 2012 3:55 PM
To: admin
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP to XLS Security Alert issue


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



Matijn,
I understand YOU believe this is normal.
I am sorry you feel that way because the construction of the document is 
exactly where the problem was resolved, and that is in PHP.
So asking in the PHP-List was the exact the place to post a question of 
document construction using PHP. Yes understanding the document verification 
methods of Microsoft helps but it is up to the DEVELOPER to put the correct 
headers and content strings to make the document valid and that is what I was 
asked.

Q: 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?



Regardless of the fact if it was produced using PHP, ASP, C or using a 
plain text editor, the point is still that there is apparently a 
problem with the file itself. The easiest solution would still be to 
ask, as Matijn suggested, the people from Microsoft Office. Since they 
are the developers/users of the software, they will know what causes 
that problem, and will be able to better help you than asking on this 
list where people are less likely to know exactly what the cause is of 
that warning.


As a metaphor: If I build a building out of steel, and all buildings in 
the area start to collapse because the ground sags, I wouldn't ask a 
steel-merchant for help, but rather someone who knows a lot about 
sagging ground.


And no, I don't know what exactly causes that warning: ask people who 
have a more intimate knowledge of Excel.


- Tul

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP to XLS Security Alert issue

2012-08-29 Thread admin
-Original Message-
From: Matijn Woudt [mailto:tijn...@gmail.com] 
Sent: Tuesday, August 28, 2012 3:55 PM
To: admin
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP to XLS Security Alert issue

 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


Matijn,
I understand YOU believe this is normal. 
I am sorry you feel that way because the construction of the document is 
exactly where the problem was resolved, and that is in PHP.
So asking in the PHP-List was the exact the place to post a question of 
document construction using PHP. Yes understanding the document verification 
methods of Microsoft helps but it is up to the DEVELOPER to put the correct 
headers and content strings to make the document valid and that is what I was 
asked. 

Q: 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?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP to XLS Security Alert issue

2012-08-29 Thread Jim Lucas

On 08/29/2012 10:28 AM, admin wrote:

-Original Message-
From: Matijn Woudt [mailto:tijn...@gmail.com]
Sent: Tuesday, August 28, 2012 3:55 PM
To: admin
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP to XLS Security Alert issue


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



Matijn,
I understand YOU believe this is normal.
I am sorry you feel that way because the construction of the document is 
exactly where the problem was resolved, and that is in PHP.
So asking in the PHP-List was the exact the place to post a question of 
document construction using PHP. Yes understanding the document verification 
methods of Microsoft helps but it is up to the DEVELOPER to put the correct 
headers and content strings to make the document valid and that is what I was 
asked.

Q: 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?


If I create a file using MS Excel, I get this message if I screw up some 
data in one of the fields.  If it has a formula in one of the cells that 
it doesn't like, then it complains.  May want to check that as well.


--
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP to XLS Security Alert issue

2012-08-28 Thread Matijn Woudt
On Tue, Aug 28, 2012 at 5:56 PM, admin ad...@buskirkgraphics.com 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(s, 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