retrieved data from mysql to be shown in spreadsheet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I only know how to in MS Excel.

make your "Report" button open a new php page..

<input name='excel' value='Report' type='button' onclick='fnExcel()'>

Javascript:

function fnExcel(x) {
ExcelWin = "excel.php";
window.open(ExcelWin,"ExcelWin","alwaysRaised=yes, status=yes, menubar=yes, width=670px, height=800px, resizable=yes");
}


put this at the top of excel.php script before anything else:

header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: filename=YourFileNameHere.xls;");

Just look for the equivalent of "application/vnd.ms-excel" for Calc of Open Office.

It's just a matter of manipulating the header Content type of the new page php will open..

look at this:

http://sourceforge.jp/docman2/ViewDocument.php?group_id=204&document_content_id=20740

HTH.

Good luck!

Marie Gezeala M. Bacuño II
Information Systems Department
Muramoto Audio-Visual Phils., Inc. (MAPLE)

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux