Solved

php generated Excel Issue

Posted on 2013-01-03
5
329 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Javascript 2 20
Getting rid of #VALUE! 7 22
$_SERVER Variable question 31 27
Excel 2007 VB Code for GCF 7 13
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

840 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