Excel Services related Snippets

Snippets are small coding helpers that you can use to make development a little faster. In this article, I will aggregate various helpers that have to do with Excel Services.

To import the snippets follow these steps:
1. Download the attached file (bottom of this article).
2. In Visual Studio 2005, choose Tools/Code Snippet Manager.
3. Choose Visual C# in the language combo
4. Now either click "Add" and choose the folder to which you opened the zip file or
5. Click the "My Code Snippets" folder and click the "Import" button and choose the snippets you want from the open file dialog.

C# Snippets in the package

esnew - This snippet will create a using() statement that creates an instance of the proxy and sets the credentials to the default ones. It defaults to ES for namespace. It also declares the stati array of Status objects.

esopenwb - Adds code for opening a workbook - declares the session id for you and lets you enter the name of the workbook.

CumGranoSalis_Snippets.zip