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?

link|improve this question

67% accept rate
feedback

1 Answer

up vote 1 down vote accepted

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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