Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
How to run a excel macros, using EXCEL.APPLICATION COM with IIS Server?
If i use EXCEL.SHEET COM object, i am getting errorCode: Select all
Fatal error: Uncaught exception 'com_exception' with message 'Unable to lookup `application': Call was rejected by callee. ' in c:\Inetpub\wwwroot\excel.php:52 Stack trace: #0 c:\Inetpub\wwwroot\excel.php(52): Excel::XL() #1 c:\Inetpub\wwwroot\testing_com.php(22): Excel->XL('Umesh.xls', 'C:\', 'Sheet1') #2 {main} thrown in c:\Inetpub\wwwroot\excel.php on line 52Reproduce the code.
Code: Select all
<?php
/* Test for Excel.php: A class for use with PHP4 scripts only*/
# Put the include file in your php include directory
require ("excel.php");
# Put the umesh.xls file in the document directory
$workbook = "Umesh.xls";
$pathin="C:\\";
$sheet = "Sheet1";
/* Instantiate Excel and open the test file. */
#Instantiate Excel
$E = new Excel;
#Open the workbook
$E->XL($workbook,$pathin,$sheet);
Print "Test starting..
";
# Print to browser
# Run the MACRO : Helloworld
$E->runmacro($workbook,"HelloWorldMacro");
# Close the Workbook
$E->closexl();
unset ($E);
?>Kindly suggest me..
Thanks in advance.
Umesh MS
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]