how to export excel file in same server


Posted on 16th Feb 2014 07:03 pm by admin

My first post - php newbie, so appreciate your support.

I'm currently using headers to save web page as excel file.

Did you know?Explore Trending and Topic pages for more stories like this.
$filename="sms.xls";
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: public");
header("Content-Description: File Transfer");
header("Content-Type: application/vnd.ms-excel");
$header="Content-Disposition: attachment; filename=".$filename.";";
header($header);
header("Content-Transfer-Encoding: binary");
@readfile($file);

I want to be able to save a copy to the server not to opening dialog save?
Not sure what I need to change or add to achieve this?

Have looked around and tried searching on here? - can't see the search threads feature if there is one?

Many thanks
No comments posted yet

Your Answer:

Login to answer
257 Like 51 Dislike
Previous forums Next forums
Other forums

[RESOLVED] Socket/Port remains open after app crashes
I'm having this problem with a networked app in vb.net.

If the program exits normally the por

Changing color in GD via variable?
Hey guys, I'm new here. x)

I'm very much a noob when it comes to PHP, but I'm trying to learn

Need a Timecode Class...
Not a Time Stamp, Time Code. Format is a bit different. HH:MM:SS:FF where FF is Frames. I dont re

A rank users order by points
I want to make an insert from table 'rank' , with number (rank) from the cod blow, to fild users.ran

Odd or Even
Inside of a while loop I need to echo several rows of info...easy enough.

In the loop (for th

Linked Keywords
I am trying to get a script that makes my predefined keyword converted to links and / or converted t

Check something, wait, check again, do something!
Hi guys.

I wonder if someone can help me with this.

Basically, what I want to do is (

Table control is disappearing from Screen
Hi Experts,

I have a screen with multiple table control(TC). Each table control has two c

From Header Showing 'Unkown' In Hotmail? Why?
Code: $to = $row_GetID['email_addr'].',sales@mywebaddress.co.uk';
$subject = 'Thank you for you

Ten Operator Syntax
Hi Guys,

I can't figure out why i am getting a parse error with this basic ten op code:

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash