Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9188907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:07:29+00:00 2026-06-17T20:07:29+00:00

I have one xlsb. (ms excel 2007) file created. I have uploaded it to

  • 0

I have one xlsb. (ms excel 2007) file created.

I have uploaded it to server and user of website can download it but when user download and open this file ms excel prompted with error as “Excel found unreadable content” when they click on yes everything is ok. I don’t know why this error displayed.

Then I have sent this xlsb file from gmail and yahoomail and when download and open everything is ok and no any error message.

so please help me to rectify this error. I am using php as my server side language and download code is below

header('Content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
    //header('Content-type: application/octet-stream');
    //header('Content-type: application/vnd.ms-excel.sheet.binary.macroEnabled.12');

    header('Content-Disposition: attachment; filename="credit-card-payoff.xlsb"');

    readfile('exporting/excel/credit-card-payoff.xlsb');

I have tried different content-type but didn’t success.

below is webpage from user can download excel

http://utc.impexdirectory.com/credit-card-payoff-calculator.php

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:07:31+00:00Added an answer on June 17, 2026 at 8:07 pm

    I have checked the file you provided and can tell you definitely what the error is: Somehow the current website gets appended to this binary-file as well. (If I cutoff the HTML part the file opens without the repair dialogue).

    So my best guess for this is, you forgot the exit statement after readfile.

    Your code should read like this:

    header('Content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
    header('Content-Disposition: attachment; filename="credit-card-payoff.xlsb"');
    
    readfile('exporting/excel/credit-card-payoff.xlsb');
    exit(0); // Terminate the program execution at this point
    

    This prevents that the website gets appended to the download file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very large excel file, it has about one milion rows and
I have one long excel sheet with books details of a library..can i import
I have one .pls file which is online but when I am creating media
I have one user that can't run my iPhone app. It starts up fine
I have one server but two directories for example: www Directory1 index.php page1.php page2.php
I'm wondering, if its possible to use macros (PERSONAL.XLSB) file created on one system
I have one user (only one, all the others are fine) trying to update
I have one model User and will be creating another one Category . Both
I have one input file which has html tag embedded in xml for example
I have one table that keeps track of links that each user has clicked

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.