Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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