Open And Read Excel Files With PHP

This post will show you how to read a ¬†Excel file (. xls) in PHP . It’s simple to use:

Below php code will read test.csv Excel file in web page.

We will use built in php library. Like fopen, fgetcsv and etc.

[sourcecode language=’php’]

“;
echo “ ” . $array[0] . “

“;
echo “ ” . $array[1] . “

“;
echo “ ” . $array[2] . “

“;
echo “ ” . $i . “

“;
echo “

“;
$i++;

}
fclose($file);
?>
[/sourcecode]

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *