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

  • Home
  • SEARCH
  • 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 7078499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:33:19+00:00 2026-05-28T06:33:19+00:00

Currently on clicking on export user is prompt a box to save/open the export

  • 0

Currently on clicking on export user is prompt a box to save/open the export excel file to their system , though what i want is when user click on export/send data , the data get exported & save to the server on specific folder & later which I mail that file to the user as an attachment.

Did I have to make any change in my header for the same ?

For ref below is the header from my export excel library:

  header("Content-type: application/vnd.ms-excel"); 
  header("Content-Disposition: attachment; filename=$this->filename"); 
  header("Pragma: no-cache"); 
  header("Expires: 0"); 
  print "$header\n$data"; 

Thanks in advance.

  • 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-05-28T06:33:20+00:00Added an answer on May 28, 2026 at 6:33 am

    The only thing you really need to do is save the Excel contents to disk on your server, you can also remove those headers completely as they are only needed when outputting the data to the browser.

    When you mail the user, simply attach the file and send.

    It should be pretty straight forward.

    EDIT:

    To save the excel file:

    file_put_contents('<your file name>', '<your file contents>');

    The content can be any string, so if you have the excel file contents in a variable, simple put it there.

    The file name can be a relative or absolute path.

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

Sidebar

Related Questions

It's currently impossible for a user to tell if clicking on something will load
I currently creating a project, in which a user can click on thumbnail of
Currently, if I want to output a SQL script for a table in my
I have developed a Java aplication that is currently being run by double-clicking on
Currently I am working on one form which contains 2 buttons. Clicking on 1
I am using JQuery to create additional input fields via clicking a link. Currently,
I am currently creating a page where upon clicking a link an iframe is
I am currently working on media player. When I am clicking the next button
hi currently i have developed my own website named www.eyeview.com. i want to update
Currently, clicking on the h2 tag toggles the div with slideToggle. However, I'm trying

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.