Writing in Excel format would require a third-party class, of which I admittedly don't know any. However, you might find what you are looking for at PHP Classes.
alright..... I've thought of an easier way to do this
when you have a txt file that have rows saparated by \n and columns saparated by \t
and then you change .txt TO .xls
you get a table in EXCEL
can you see how easy is this : )
now .. here's the code.. there's something that doesn't work ! can you check it please
[php]
<?
$sql = "SELECT field1,field2,f ield3 FROM MyTable WHERE field3='3'";
I'm not getting a box asks me whether I want to open or save EXCEL file !!!!
I'm just getting the data displayed as this:
field1 field2 field3 "a" "b" "3" "c" "d" "3" "e" "f" "3"
with no \t and with no \n --- just spaces !!
this confuse me
youve just wrote file to hardrive but you want to send it to the client
i think you want to redirect to that file now
or you want to print the results
[php]
$myArray = file("file.xls" );
foreach($myArra y as $var){
echo $var
}
[/php]
add that at the end of your script
it should work (let me know cos i'm going to do something like that for .svg)
Comment