Re: [PHP] RE: [PHP-WIN] Revised [PHP] COM and PHP

2001-02-05 Thread Sterling Hughes


 I tried with FALSE same error.

 I also tried the following word example

 ?
 $word = new COM("word.application") or die("Unable to instanciate Word");
 print "Loaded Word, version {$word-Version}\n";
 $word-Visible = 0;
 $word-Documents-Add();
 $word-Selection-TypeText("Testing, testing... 1,2,3");
 $word-Documents[1]-SaveAs("Some.doc");
 $word-Quit();
 ?

 I get the following error

 Loaded Word, version 9.0
 Warning: Invoke() failed: No description available in
 c:\Inetpub\wwwroot/temp2.php on line 5

 Warning: Invoke() failed: Exception occurred. in
 c:\Inetpub\wwwroot/temp2.php on line 7


That means that you don't have the com component installed on your machine
correctly...




  I have been trying the following example from the PHP developer's
cookbook
  and it keeps giving me the following error.

  Parse error: parse error in c:\Inetpub\wwwroot/temp.php on line 5
  ? file://line 1
  $excel_handle = new COM("excel.application"); file://line2
 $excel_handle-Visible = false; file://line3
  $worksheet = $excel_handle-workbooks-add(); file://line4
 $worksheet-Cells(1,1)-value = "Name"; file://line5

This should be:

$cell = $worksheet-Cells(1, 1);
$cell-value = 1;

And it should work..



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] RE: [PHP-WIN] Revised [PHP] COM and PHP

2001-02-05 Thread Conover, Ryan

I tried with FALSE same error.

I also tried the following word example

?
$word = new COM("word.application") or die("Unable to instanciate Word");
print "Loaded Word, version {$word-Version}\n";
$word-Visible = 0;
$word-Documents-Add();
$word-Selection-TypeText("Testing, testing... 1,2,3");
$word-Documents[1]-SaveAs("Some.doc");
$word-Quit();
?

I get the following error

Loaded Word, version 9.0 
Warning: Invoke() failed: No description available in
c:\Inetpub\wwwroot/temp2.php on line 5

Warning: Invoke() failed: Exception occurred. in
c:\Inetpub\wwwroot/temp2.php on line 7

Ryan


-Original Message-
From: Andris Jancevskis [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 05, 2001 3:01 PM
To: Conover, Ryan
Subject: Re: [PHP-WIN] Revised [PHP] COM and PHP


Try "FALSE" instead of "false"

Andris
mailto:[EMAIL PROTECTED]

+---
Monday, February 05, 2001, 10:05:24 PM, you wrote:






 I have been trying the following example from the PHP developer's cookbook
 and it keeps giving me the following error.

 Parse error: parse error in c:\Inetpub\wwwroot/temp.php on line 5
 ? //line 1
 $excel_handle = new COM("excel.application"); //line2
$excel_handle-Visible = false; //line3
 $worksheet = $excel_handle-workbooks-add(); //line4
$worksheet-Cells(1,1)-value = "Name"; //line5
$worksheet-SaveAs("temp.xls"); //line6
$excel_handle-quit(); //line7
 //line8
? //line9

 Anyone that has Com and PHP experience help please

 Ryan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]