Just to give you some background on myself, I have experience with html and css, and also python flask. But I've never used php.
I'm trying to develop a webpage that shows everything in an excel sheet. I'm using the example from http://ift.tt/1BmseLo
However I'm not 100% sure how to incorporate it for a web page. Here's my php script, do I need to incorporate this into html?
<?php
$xlFile = realpath('Dataset.xls');
$xlDirectory = dirname($xlFile);
$connectionString = odbc_connect(
"Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=$xlFile;DefaultDir=$xlDir" , '', '');
$sqlQuery = "SELECT Occupation Name FROM LongTermExport";
$results = odbc_exec($connectionString, $sqlQuery);
while(odbc_fetch_row($results)){ $output1 = odbc_result($results, 1); }
print(“<html><head>Excel Data</head><body>”); print("$output1 "); print(“</body></html>”);
odbc_close($connectionString);
?>
Aucun commentaire:
Enregistrer un commentaire