locked
Using excel with VBA in sharepoint RRS feed

  • Question

  • Team,

    I have query on using Excel with VBA code. I have uploaded a excel with VBA code but i am able to use the VBA code it is throwing an error VBA doesnt work in Sharepoint? is that the case?

    Regards,

    Eshwar.

    Tuesday, July 10, 2012 7:47 AM

Answers

  • Sorry, but Excel Services (that is, Excel spreadsheets rendered in the browser) doesn't support VBA (see here: http://msdn.microsoft.com/en-us/library/ff595319).

    You can save an Excel workbook in a document library and always open it in Excel on the desktop, where VBA will work.

    Depending on what you need to do, you might want to look into User-Defined Functions as an alternative to VBA.  UDFs are supported in Excel Services but take a bit of work to develop and use.  A good starting point is this: http://msdn.microsoft.com/en-us/library/ms499792.aspx

    Duncan


    Duncan Sutcliffe
    All postings are solely my own and do not represent or constitute Hitachi Consulting's positions, views, strategies or opinions.

    Tuesday, July 10, 2012 8:34 AM

All replies

  • Sorry, but Excel Services (that is, Excel spreadsheets rendered in the browser) doesn't support VBA (see here: http://msdn.microsoft.com/en-us/library/ff595319).

    You can save an Excel workbook in a document library and always open it in Excel on the desktop, where VBA will work.

    Depending on what you need to do, you might want to look into User-Defined Functions as an alternative to VBA.  UDFs are supported in Excel Services but take a bit of work to develop and use.  A good starting point is this: http://msdn.microsoft.com/en-us/library/ms499792.aspx

    Duncan


    Duncan Sutcliffe
    All postings are solely my own and do not represent or constitute Hitachi Consulting's positions, views, strategies or opinions.

    Tuesday, July 10, 2012 8:34 AM
  • Hi Sharepoint team,

    Has the situation changed after the last answer?

    I really have need to use multiple different Excel files, which locates on Sharepoint folders, with VBA. Manually tasks which I / our team have to do would take ages, but via VBA only a couple of seconds.

    If it is still not possible to open Excel files from Sharepoint via VBA, do you have any workaround for this?

    I would need only a short piece of example VBA code, which would open a certain Excel file from certain Sharepoint folder. And if there is need to use check out/in features, then I'm interested about those also as well as closing the file without saving in case if this is not the same functionality than working outside of Sharepoint.

    Best regards,

    Janne

    Tuesday, November 12, 2013 4:43 PM
  • Dear Sharepoint Team:

    One of our customer want to run a SQL Store Process with paramater to load data into excel, they use VBA to set paramater value to get differenct result scope for different user...They want to share the excel file on Sharepoint Server 2013 on premise, and hope users could open the file in browser ( through Excel web service)

    Since VBA dose not work in excel service, do you have any alternative solution to achive the goal?

    thank you very much !!!

    Eva Zhao

    Thursday, April 30, 2015 8:52 AM