WSH scripts WITHIN Excel? 
Author Message
 WSH scripts WITHIN Excel?

I want to use Perl code for macros inside Excel, to replace Visual
Basic on occasion. I can do this with the Perl COM module but this
requires a licence, which limits my ability to share my work.

Is there a way I can somehow embed Perl scripts inside an Office
application with WSH? I'm not sure how convenient writing external
scripts is when I want to interract with selections and use macros
called from Excel.

Is it easy to write a macro that does some processing of an Excel
spreadsheet based on the selection which is actually a script hosted by
WSH?

thanks for any help,

--
Tim Richardson

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Fri, 08 Feb 2002 03:00:00 GMT  
 WSH scripts WITHIN Excel?

Quote:
> Is there a way I can somehow embed Perl scripts inside an Office
> application with WSH? I'm not sure how convenient writing external
> scripts is when I want to interract with selections and use macros
> called from Excel.

Hi,

You would be better off with Windows Script Components (also known as
scriptlets).

http://msdn.microsoft.com/scripting/

You could write a COM object in PerlScript, and then call that from a
wrapper function in VBA that passed the Excel.Application object to Perl.

Or something like that.

Peter

--
Peter J. Torr - Microsoft Windows Script Program Manager

Please do not e-mail me with questions - post them to this
newsgroup instead. Thankyou!



Fri, 08 Feb 2002 03:00:00 GMT  
 WSH scripts WITHIN Excel?
One (not very pretty) way would be to write a wrapper macro (vba) that
creates an instance of the MS Script Control.  You could expose Excel
objects via AddObject and use any scripting language installed on the box...

I think Peter's WSC suggestion is simpler...

--
Michael Harris


| I want to use Perl code for macros inside Excel, to replace Visual
| Basic on occasion. I can do this with the Perl COM module but this
| requires a licence, which limits my ability to share my work.
|
| Is there a way I can somehow embed Perl scripts inside an Office
| application with WSH? I'm not sure how convenient writing external
| scripts is when I want to interract with selections and use macros
| called from Excel.
|
| Is it easy to write a macro that does some processing of an Excel
| spreadsheet based on the selection which is actually a script hosted by
| WSH?
|
| thanks for any help,
|
| --
| Tim Richardson
|
|
| Sent via Deja.com http://www.deja.com/
| Share what you know. Learn what you don't.



Fri, 08 Feb 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Microsoft samples for using Excel within WSH

2. Excel properties from within WSH

3. Problem with auto_open macro within Excel 97 calling from VB script

4. Problem with auto_open macro within Excel 97 calling from VB script

5. Instancing ActiveX controls within WSH Scripts

6. Wsh script execution difference within opened and disconnected tse sessions

7. execute WSH scripts within a browser

8. Executing WSH Scripts within a Browser

9. WSH scripting in Excel

10. how delete a macro within an Excel Workbook by using VB

11. Invoking Excel from within IE4.0

12. Using the Excel Trend Function from within VB

 

 
Powered by phpBB® Forum Software