This is a discussion on export to word file using PHP? within the PHP Programming forums, part of the Web Development category; generally we are exporting excel or csv file, here i want to do the same process in ms word document....
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| hai it is very simple please run these simple program In the test.php type these coding <a href="export.php">click here</a> and save it after open the new page and save the file name as export.php in the export.php file type this coding <?php $vExcelFileName="export". ".doc"; header("Content-type: application/x-ms-download"); //#-- build header to download the excel file header("Content-Disposition: attachment; filename=$vExcelFileName"); header('Cache-Control: public'); echo "hai"; ?> so if u click the (click here) link in test.php means one window will open for open or saving the document file. in the document file with the words (hai). if u need to expotr the details to excel sheet means change the extension for example $vExcelFileName="export". ".xls"; thank u.................... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Export table values into excel | oxygen | C# Programming | 2 | 03-18-2008 02:13 AM |
| Export Lightroom Plugin | kingmaker | C# Programming | 3 | 11-29-2007 06:41 AM |
| How do we import or export data in MySql | Jeyaseelansarc | Database Support | 8 | 08-17-2007 07:25 AM |
| How can we import and export using BCP utility in SQL? | oxygen | Database Support | 1 | 07-26-2007 04:33 AM |
| How to convert a word document/text document/PDF file into an image file? | kingmaker | C# Programming | 0 | 07-16-2007 11:23 PM |