Click to See Complete Forum and Search --> : How can I read data from MsExcell files?


Anon
11-07-2000, 07:18 PM
Hi guys, I'm a novice in php, and i've got some Microsoft Excell files for my site.

How can I get data from these files, for my dynamic stats?

Thanks
Marco Bertolotti

Anon
11-08-2000, 03:11 AM
Hi!

How about using ODBC connection? I actually have never used ODBC together with Excell, but I think it is possible. Just set the (System) DSN for the Excell file. And use the ODBC functions in PHP.

Hope this helps

-ARi

Anon
11-09-2000, 07:17 AM
Can you export the files into comma seperated text files? php can access them quite easily...is that an option?

---John Holmes...

Anon
03-23-2001, 02:08 AM
how to use php to access the CSV file?
could you tell me?

Anon
03-23-2001, 02:37 AM
Just use file() or fopen(). read in a line, explode by "," and then you have your data. File() is easiest...

Use this:

$filename = "blah.txt";
$file = file($filename);
for($count=0;$count<count($file);$count++)
{
$line = explode(",",$file[$count]);
//$line will be an array containing
//each value that was seperated by a comma
echo $line[0];
echo $line[1];
}

Adapt to your needs, of course.

---John Holmes...