Excell workbook procedure call from browser/server script? 
Author Message
 Excell workbook procedure call from browser/server script?

Hi,

In either a browser or ASP script can I call a function
that is in an Excell workbook and have the result returned
to the script?  Can the result be an array or a dictionary object?

Would it look something like this? -

Set xl = CreateObject(Excell.application.8)    'Server.CreateObject for ASP
set myBook = xl.workbook.open("path\book.xls")
myVar = myBook.functionName(var1, var2)

thnx,
Bill Wallace



Fri, 20 Aug 2004 14:08:38 GMT  
 Excell workbook procedure call from browser/server script?
Yes - with some modifications...YOu can try it from raw VBScript with no problem just to verify.  Working in a borwser will
introduce limitations based on security settings and the inability of ASP to display some things serverside.

Here's a "raw" example of accessing the entire Excel application from a vbscript.  Methodology is identical to that for IE, and
calling the function will follow from whateverthe VBA procedure to call a function is, treating it as a child of the XL object.
Note that you need quotes, and Excel shoould have only 1 "L"; alos, the ".8" means that you will not be using a version-independent
ProgID.  You should be able to do without it.

Unfortunately, at that point my knowledge of Excel automation ends.. :(

Set xl = CreateObject("Excel.application")
XL.Workbooks.Add
XL.Visible=True

: Hi,
:
: In either a browser or ASP script can I call a function
: that is in an Excell workbook and have the result returned
: to the script?  Can the result be an array or a dictionary object?
:
: Would it look something like this? -
:
: Set xl = CreateObject(Excell.application.8)    'Server.CreateObject for ASP
: set myBook = xl.workbook.open("path\book.xls")
: myVar = myBook.functionName(var1, var2)
:
: thnx,
: Bill Wallace
:
:
:



Fri, 20 Aug 2004 14:26:25 GMT  
 Excell workbook procedure call from browser/server script?
Hey! Where did that second 'L' come from?  Thnx Alex.

I'm just going to have to try it as soon as I get some more
free minutes at work.

Bill Wallace



Quote:
> Yes - with some modifications...YOu can try it from raw VBScript with no

problem just to verify.  Working in a borwser will
Quote:
> introduce limitations based on security settings and the inability of ASP to

display some things serverside.
Quote:

> Here's a "raw" example of accessing the entire Excel application from a

vbscript.  Methodology is identical to that for IE, and
Quote:
> calling the function will follow from whateverthe VBA procedure to call a

function is, treating it as a child of the XL object.
Quote:
> Note that you need quotes, and Excel shoould have only 1 "L"; alos, the ".8"

means that you will not be using a version-independent
Quote:
> ProgID.  You should be able to do without it.

> Unfortunately, at that point my knowledge of Excel automation ends.. :(

> Set xl = CreateObject("Excel.application")
> XL.Workbooks.Add
> XL.Visible=True




Quote:
> : Hi,
> :
> : In either a browser or ASP script can I call a function
> : that is in an Excell workbook and have the result returned
> : to the script?  Can the result be an array or a dictionary object?
> :
> : Would it look something like this? -
> :
> : Set xl = CreateObject(Excell.application.8)    'Server.CreateObject for ASP
> : set myBook = xl.workbook.open("path\book.xls")
> : myVar = myBook.functionName(var1, var2)
> :
> : thnx,
> : Bill Wallace
> :
> :
> :



Sat, 21 Aug 2004 02:52:35 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. TechTip: Understanding LOCAL SHARE

2. How to call a procedure in another workbook from Workbook_Open

3. Borland Pascal 7.0 on 1.8Ghz plus computers.

4. HELP!! Need Code to Access Fax/Modem

5. Calling SQL Server Store Procedure

6. Calling SQL Server Store Procedure

7. HELP - ASP Calling SQL Server Stored procedure

8. Can jscript call Excell functions

9. Icons for EXEs?

10. Call a VBA procedure from within VBS script?

11. calling procedure from vb script with datetime as one of the input parameter

12. HELP: BDE and SQL Server

 

 
Powered by phpBB® Forum Software