| | |
HTML To Excel
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2007
Posts: 15
Reputation:
Solved Threads: 1
Hi
Is there anyone who know How to capute a whole HTML file and convert itto Excel
for example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="description" content="">
<title>Fourth Year Computer Technology Time Table</title>
</head>
<body>
<p> </p>
<p> </p>
<table cellspacing='4' cellpadding='4' border="1" align="center">
<tr>
<td>Day</td>
<td>Time</td>
<td>Unit</td>
<td>Lecturer</td>
</tr>
<tr>
<td>Monday</td>
<td>8.00am To 1.00 Pm </td>
<td>BCT 2406 Project Research and definition</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Tuesday</td>
<td>8.00am To 10.00am </td>
<td>BCT 2405 Client Server Systems & Computing</td>
<td>JB Kariuki</td>
</tr>
<tr>
<td> </td>
<td>12.00noon To 2.00PM</td>
<td>BCT 2405 Computer Graphics System</td>
<td>Kihongo</td>
</tr>
<tr>
<td> </td>
<td>2.00PM To 5.00 PM </td>
<td>BCT 2405 Computer Graphics System</td>
<td>Kihongo</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Wednesday</td>
<td>7.00am To 10.00am </td>
<td>BCT 2405 Client Server Systems & Computing</td>
<td>JB Kariuki</td>
</tr>
<tr>
<td> </td>
<td>11.00noon To 1.00PM</td>
<td>BCT 2403 Knowledge Based Systems</td>
<td>George Okeyo</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Thursday</td>
<td>7.00am To 10.00am </td>
<td>BCT 2403 Knowledge Based Systems</td>
<td>George Okeyo</td>
</tr>
<tr>
<td> </td>
<td>11.00am To 12.00 PM </td>
<td>BCT 2401 Operations Research</td>
<td>P Kihara</td>
</tr>
<tr>
<td> </td>
<td>12.00am To 2.00 PM </td>
<td>BCT 2404 Decision Support System</td>
<td>L Mburu</td>
</tr>
<tr>
<td> </td>
<td>3.00am To 6.00 PM </td>
<td>BCT 2404 Decision Support System</td>
<td>L Mburu</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Friday</td>
<td>9.00am To 10.00am </td>
<td>BCT 2401 Operations Research</td>
<td>P Kihara</td>
</tr>
<tr>
<td> </td>
<td>11.00am To 2.00 PM </td>
<td>Research Methodology</td>
<td>L Mengo</td>
</tr>
<tr>
<td> </td>
<td>2.00PM To 4.00 PM </td>
<td>Research Methodology</td>
<td>L Mengo</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
Is there anyone who know How to capute a whole HTML file and convert itto Excel
for example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="description" content="">
<title>Fourth Year Computer Technology Time Table</title>
</head>
<body>
<p> </p>
<p> </p>
<table cellspacing='4' cellpadding='4' border="1" align="center">
<tr>
<td>Day</td>
<td>Time</td>
<td>Unit</td>
<td>Lecturer</td>
</tr>
<tr>
<td>Monday</td>
<td>8.00am To 1.00 Pm </td>
<td>BCT 2406 Project Research and definition</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Tuesday</td>
<td>8.00am To 10.00am </td>
<td>BCT 2405 Client Server Systems & Computing</td>
<td>JB Kariuki</td>
</tr>
<tr>
<td> </td>
<td>12.00noon To 2.00PM</td>
<td>BCT 2405 Computer Graphics System</td>
<td>Kihongo</td>
</tr>
<tr>
<td> </td>
<td>2.00PM To 5.00 PM </td>
<td>BCT 2405 Computer Graphics System</td>
<td>Kihongo</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Wednesday</td>
<td>7.00am To 10.00am </td>
<td>BCT 2405 Client Server Systems & Computing</td>
<td>JB Kariuki</td>
</tr>
<tr>
<td> </td>
<td>11.00noon To 1.00PM</td>
<td>BCT 2403 Knowledge Based Systems</td>
<td>George Okeyo</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Thursday</td>
<td>7.00am To 10.00am </td>
<td>BCT 2403 Knowledge Based Systems</td>
<td>George Okeyo</td>
</tr>
<tr>
<td> </td>
<td>11.00am To 12.00 PM </td>
<td>BCT 2401 Operations Research</td>
<td>P Kihara</td>
</tr>
<tr>
<td> </td>
<td>12.00am To 2.00 PM </td>
<td>BCT 2404 Decision Support System</td>
<td>L Mburu</td>
</tr>
<tr>
<td> </td>
<td>3.00am To 6.00 PM </td>
<td>BCT 2404 Decision Support System</td>
<td>L Mburu</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Friday</td>
<td>9.00am To 10.00am </td>
<td>BCT 2401 Operations Research</td>
<td>P Kihara</td>
</tr>
<tr>
<td> </td>
<td>11.00am To 2.00 PM </td>
<td>Research Methodology</td>
<td>L Mengo</td>
</tr>
<tr>
<td> </td>
<td>2.00PM To 4.00 PM </td>
<td>Research Methodology</td>
<td>L Mengo</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
use the following code:
i have just included the first row and hope you will not have problems with the rest:
please if found this code helpful, can you add my reputation
i have just included the first row and hope you will not have problems with the rest:
PHP Syntax (Toggle Plain Text)
<?php echo "<table cellspacing='4' cellpadding='4' border=1 align=center>"; echo"<tr>"; echo"<td>Day</td>"; echo"<td>Time</td>"; echo"<td>Unit</td>"; echo"<td>Lecturer</td>"; echo"</tr>"; echo"</table>"; header("Content-type: application/octet-stream"); # replace excelfile.xls with whatever you want the filename to default to header("Content-Disposition: attachment; filename=excelfile.xls"); header("Pragma: no-cache"); header("Expires: 0"); ?> </p> </body> </html>
please if found this code helpful, can you add my reputation
![]() |
Similar Threads
- SAS ODS HTML page breaks for Excel (Computer Science)
- Need help with VB & Excel data transferring (Visual Basic 4 / 5 / 6)
- Excel to Html (Perl)
- Excel Spreadsheet as HTML (HTML and CSS)
- Advanced Web Ranking 3.8 (Search Engine Optimization)
- can't remove searchpage.html trojan (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: Please Help, Parse Error: syntax error, unexpected T_STRING
- Next Thread: pass the value of a css file dynamically
| Thread Tools | Search this Thread |
.htaccess ajax apache api array back basic beginner binary broken cakephp checkbox class cms code computing cron curl customizableitems database date delete display dynamic echo email error file files filter folder form forms function functions gc_maxlifetime google host href htaccess html image include insert integration ip java javascript joomla limit link login loop mail memmory memory menu mlm mod_rewrite multiple mysql navigation oop parsing paypal pdf php problem query radio random recursion regex remote script search server sessions sms snippet soap source space sql syntax system table thesishelp trouble tutorial update upload url validation validator variable video web xml youtube





