954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Problem in Export to excel in Php

Hello Everyone,

I want to transfer data in export from my php reports.
it works also. but the problem is when i open that .xls file in notepad i can view all my data. i don't want this.my data will be unsecure.can anybody tell me solution??
code is as below:

$xlsfile = "Total Addtion".date("m-d-Y-hiA").".xls";

header('Content-type: application/ms-excel');
header("Content-Disposition: attachment; filename=$xlsfile");
header("Pragma: no-cache");
 header("Content-Transfer-Encoding: binary ");
dd2308
Newbie Poster
11 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

So what do you want ?

pritaeas
Posting Expert
Moderator
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

when i open it in notepad javascrit can be viewed also sometime query if they arey coded as echo

dd2308
Newbie Poster
11 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

if u open a normal excel file in notepad u can't read anything .

dd2308
Newbie Poster
11 posts since May 2011
Reputation Points: 10
Solved Threads: 0
 

Maybe you are outputting the wrong thing. Hard to say without any code.

pritaeas
Posting Expert
Moderator
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: