I created an Excel workbook in Visual Studio 2010 using VSTO, and it fills a table with data retrieved from a WCF service. The service was added to the project using the standard "Add Service Reference..." method, and it uses the code-behind file to create the service proxy, get the data and then bind it to the table.

This all works fine and dandy when I publish the workbook and run it locally. However, when I publish it to SharePoint I just get static data. There are no error messages shown immediately, and I cannot find any errors in the log files.

In order to rule out the service reference as being my main stumbling block, I removed the service code and simply wrote a simple code-behind method to set some static text into a cell - and it still won't run on SP 2010!

Has anyone published a VSTO Workbook to SharePoint 2010 and had the code-behind actually work?

1 Answer 1


This isn't possible because code-behind created with VSTO does not execute on the server. Not even VBA will execute on the server! Please see this post for more details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.