469,282 Members | 1,772 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

File downloading problem

Hello everyone.

I am facing problem in downloading .xls file.

I generate report and save data in excel sheet on server. and once user click the 'save data in excel format', an excel sheet is been created on the server.once created then user can download that file.

i am able to download file but the problem is that when user apply sorting to data and then save data in excel sheet. the file on the server contains the data in the same sorting order as the user selected BUT while downloading file it downloads the old file (i.e without sorting).

now this is strange because the file on the server got replaced every time user gives command to save the file.

i guess its cache problem....

please help me out.

many thanks
Feb 28 '08 #1
1 1415
490 Expert 256MB
You could download on the fly using a spot of content disposition.

If you already have the php that writes the xls file then change the headers and download it direct to the user.....

[PHP]header("Content-type: application/msexcel");
header("Content-Disposition: attachment; filename=excel.xls");[/PHP]

Feb 28 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by serge | last post: by
2 posts views Thread by Bala | last post: by
2 posts views Thread by Tomas Martinez | last post: by
6 posts views Thread by rony_16 | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.