PHP File going to Microsoft Excel “The file is corrupt and cannot be opened” [solved]

Encoutered this issue with a website I was working on. When i convert the data to excel it comes out with message “The file is currpt and cannot be opened”.

When I tried to do research I found a page that says you open the file using notepad and then save it. Once done, you can open it normally.

To my end I was able to solve it by moving the access codes (user , password , database) of the mysql to the actual page itself. Usually I reference it from another php page. But this time, moving it solved my problem

Hope this helps somebody out there

Coffee Cup

Welcome to our first blog post!

Hi and greetings from Basic Website Solutions. Welcome to the website. Get ready because we plan to provide helpful tips and comments from our daily walk in the world of software development and website design.

Aside from this we will also tackle the life of living in our time here in the Philippines.

We hope you enjoy your stay!

BWS Team