Solved

php generated Excel Issue

Posted on 2013-01-03
5
314 Views
Last Modified: 2013-01-03
We have a php program that generates a report from the database & creates an Excel Spreadsheet. The program runs multiple times per day & has been working for over a year.

Yesterday, I made some minor changes in the logic that generates the rows under specific conditions. The program now fails in IE & Chrome. In FireFox, it works. The program is attached.

In IE & Chrome, Excel issues the message in the attached image called rpt-error-ie.jpg. When you click OK, nothing happens.

In FireFox, you get SOMETIMES the message called rpt-error-ff,jpg and SOMETIMES you get the other one.

In FireFox, in BOTH cases, if you click OK, the report opens correctly in Excel. When geneated in IE or Chrome, it DOES not do anything.

Note that the message I called rep-error-ff has occurred in ALL 3 browsers always since the beginning. Clicking OK always works.

I recognize that the message is created by Excel.

Why is this happening?
rpt-error-ie.jpg
rpt-error-ff.jpg
report1.php
0
Comment
Question by:Richard Korts
  • 3
  • 2
5 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 38741270
Compare it to your backup copy and see what has changed.  Or just restore your backup copy.
0
 

Author Comment

by:Richard Korts
ID: 38741330
I had already restored the backup & it works. I will do a compare; but I added code so it will be different.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38741481
Do you have WinMerge?  It makes the comparison task very easy.  http://winmerge.org/
0
 

Author Closing Comment

by:Richard Korts
ID: 38742301
WinMerge is a SUPERB tool! Found it right away.

FYI, I had put the Excel extension at "xlxs" on the new one; It was "xls" on the old (working) one.

I changed the new to xls; works like a charm!!

I guess the "marriage" between HTML "content type" & Excel is limited. As far as I know, my customer has the latest Excel; but maybe not.

Thanks & Happy New Year!
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38742383
You're welcome, glad to help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now