none
Excel + <programming language>

    Question

  • Hi all,

    Is there a way to use Excel in combination with another programming language that VBA? I.e., is it possible to use JavaScript instead of VBA?

    Thanks!

    W

    Saturday, August 03, 2013 12:15 PM

Answers

  • Hi,

    you could also use VSTO, which is based on .NET and is something like a successor of VBA. To get started have a look at the following site - http://msdn.microsoft.com/en-us/office/hh133430.aspx


    Best Regards. When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer. This helps us build a healthy and positive community.

    @Horizon_Net | Blog

    Saturday, August 03, 2013 6:05 PM
  • With Excel-DNA (an independent project to integrate .NET with Excel) you can use any of the .NET languages to create UDFs and even full-featured add-ins for Excel. F# is particularly well suited to making functions for Excel, some recent examples are here.

    There used to be reasonable JavaScript support through .NET, with the JScript language. With the JScript compiler and Excel-DNA you could make worksheet UDFs using JavaScript - this example (from 2007) showed how you could do that, but I'm not sure about the current state of support for JScript. If you used any of the JavaScript to .NET compilers, you should be able to use JavaScript like any other .NET language for this. Likewise, Java via the IKVM virtual machine will work with Excel-DNA.

    For Python, the preferred extension tool is PyXLL.

    For C++ there are a few options:

    * XLW is a popular and well-supported open source option,

    * Keith Lewis has a project that uses modern C++ style, and

    * XLL+ from Planatech is a commercial toolkit for making Excel add-ins with C++.

    Regards,

    Govert

    Excel-DNA - Free and easy .NET for Excel

     
    Wednesday, August 07, 2013 5:11 PM

All replies

  • Re:  In Excel    "is it possible to use JavaScript instead of VBA"

    Not that I am aware of.
    Check out this file for MS 'scripting' options...
    http://www.microsoft.com/en-us/download/details.aspx?id=2764
    '---
    Jim Cone
    Portland, Oregon USA
    Formats & Styles Excel add-in - free
    (lists or removes unused styles in a workbook)

    Saturday, August 03, 2013 2:33 PM
  • Hi,

    you could also use VSTO, which is based on .NET and is something like a successor of VBA. To get started have a look at the following site - http://msdn.microsoft.com/en-us/office/hh133430.aspx


    Best Regards. When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer. This helps us build a healthy and positive community.

    @Horizon_Net | Blog

    Saturday, August 03, 2013 6:05 PM
  • With Excel-DNA (an independent project to integrate .NET with Excel) you can use any of the .NET languages to create UDFs and even full-featured add-ins for Excel. F# is particularly well suited to making functions for Excel, some recent examples are here.

    There used to be reasonable JavaScript support through .NET, with the JScript language. With the JScript compiler and Excel-DNA you could make worksheet UDFs using JavaScript - this example (from 2007) showed how you could do that, but I'm not sure about the current state of support for JScript. If you used any of the JavaScript to .NET compilers, you should be able to use JavaScript like any other .NET language for this. Likewise, Java via the IKVM virtual machine will work with Excel-DNA.

    For Python, the preferred extension tool is PyXLL.

    For C++ there are a few options:

    * XLW is a popular and well-supported open source option,

    * Keith Lewis has a project that uses modern C++ style, and

    * XLL+ from Planatech is a commercial toolkit for making Excel add-ins with C++.

    Regards,

    Govert

    Excel-DNA - Free and easy .NET for Excel

     
    Wednesday, August 07, 2013 5:11 PM
  • You can write nearly any function you want in VB.net, C, C++, C#, and compile that function into a library that you include as a reference when writing your VBA.  This ends up being a pretty good way to utilize APIs, since much of that code is written and publicly available in languages other than VBA.

    see here:

    http://www.codeproject.com/Articles/555660/Extend-your-VBA-code-with-Csharp-VB-NET-or-Cpluspl


    -jerrykern


    • Edited by jerrykern Wednesday, August 07, 2013 5:29 PM added example URL
    Wednesday, August 07, 2013 5:28 PM