|PHP:Writing to excel file using PEAR||#1|
I have installed PEAR,
and OLE. The sample program is executed successfully but when I try to read the file it shows garbage values. I also tried
I am using this tutorial and Google lot for this problem.
Thanks in advance.
posted date: 2008-12-23 05:01:00
|Re: PHP:Writing to excel file using PEAR||#3|
I try to use PEAR only when I really need to...you can easily generate an excel spreadsheet( assuming it's just data) with something like this:
$header = "Last Name\tFirst Name\tAge\tJob\n"; // new line is start of new row, tab is next column//ideally you would get this from a DB and just loop through it and append on$row1 = "Smith\tBob\t25\tManager\n";$row2 = "Anderson\tTrent\t32\tCEO\n";$excel = $header.$row1.$row2;$xlsfile = "excel_example".date("m-d-Y-hiA").".xls";header('Content-type: application/vnd.ms-excel');header("Content-Disposition: attachment; filename=$xlsfile");echo $excel;
posted date: 2008-12-23 08:54:00
|Re: PHP:Writing to excel file using PEAR||#4|
You fail to share code. No way anyone tries it based on this description.
posted date: 2008-12-30 15:18:00
|Re: PHP:Writing to excel file using PEAR||#5|
that's just a tab seperated value file though and you're sending headers suggesting the browser treat that data as an excel file. so there's no formatting of data which the poster may require.
posted date: 2009-09-16 14:36:00
|Re: PHP:Writing to excel file using PEAR||#6|
this is a .csv vile, not a real .xls binary file.
posted date: 2010-10-12 00:54:00
|select page: « 1 »|