Click to See Complete Forum and Search --> : reading EXCEL with PHP thru COM


Anon
10-19-2000, 09:09 AM
I'm using PHP4, Apache server, EXCEL V8, Windows NT4.

I try to read an Excel file using the exemple of Alain Samoun :
$workbook = "D:/apache/htdocs/sites/test.xls";

$ex = new COM("Excel.sheet") or Die ("Did not connect");

#Get the application name and version // that works good
print "Application name:{$ex->Application->value}<BR>" ;
print "Loaded version: {$ex->Application->version}<BR>";
echo "$workbook<BR>";
// it works up to this point
#Open the workbook that we want to use.
$wkb = $ex->Application->Workbooks->Open($workbook) or Die ("Did not Did not"); // prints Did not Did not

It prints Excel V8. After, I have an error message :
Warning: Invoke() failed: No description available in <my file> on line <of the open>

Do you have a solution for me ?

DEN

Anon
10-20-2000, 08:56 PM
Shouldnt the paths in $workbook be '\' instead of '/' !

// D

Anon
12-03-2001, 05:59 PM
This was a year ago.. But I'm interesting this problem now. Can anybody help me?

Anon
03-12-2002, 02:40 PM
Use:

$workbook = 'D:\Inetpub\wwwroot\test.xls';

Instead of:

$workbook = "D:\Inetpub\wwwroot\test.xls";

The "\t" in "\test.xls" reads as (TAB)est.xls

manoj
03-21-2002, 05:51 AM
Hi,

I require the similar functionality ie reading excel with PHP..
BUT without using COM

Thanks,
Looking forward for an early reply.

Manoj