Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on 

php generated Excel Issue

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
Microsoft ExcelPHPHTML

Avatar of undefined
Last Comment
Dave Baldwin
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Richard Korts

ASKER

I had already restored the backup & it works. I will do a compare; but I added code so it will be different.
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Do you have WinMerge?  It makes the comparison task very easy.  http://winmerge.org/
Avatar of Richard Korts

ASKER

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!
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

You're welcome, glad to help.
Microsoft Excel
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo