How to parse excel contents from excel document using php
I have an excel document with many columns.I want to parse that data.Please help in php.Provide开发者_如何学Go simple means to guide
Thanks
look at this class
http://phpexcel.codeplex.com/
you can find an example of read here
if it saves as CSV this is how to read it:
<?php
$row = 1;
if (($handle = fopen("test.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
echo "<p> $num fields in line $row: <br /></p>\n";
$row++;
for ($c=0; $c < $num; $c++) {
echo $data[$c] . "<br />\n";
}
}
fclose($handle);
}
?>
I've used this in one of my projects...works like a charm :P http://sourceforge.net/projects/phpexcelreader/
精彩评论