SpreadsheetGear 2017 for .NET comes with the SpreadsheetGear Explorer sample solutions which are helpful Windows Forms applications for Visual Studio 2008. Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, Visual Studio 2015 and Visual Studio 2017 will offer to convert these solutions to Visual Studio 2010 / 2012 / 2013 / 2015 / 2017 solutions the first time they are opened.
The SpreadsheetGear Explorers are available with C# and Visual Basic source code and are composed of a set of user controls, each of which demonstrates commonly used SpreadsheetGear 2017 functionality and API's. Source code can be viewed and copied directly from the source viewer below each sample. Follow the steps below to open and run the SpreadsheetGear Explorer solutions from Windows (requires a version of Visual Studio which supports Windows Forms solutions and either C# or Visual Basic).
Please see Troubleshooting SpreadsheetGear Explorer below if you are having problems running the samples.
Running the SpreadsheetGear Explorer Sample Solutions
- Install SpreadsheetGear 2017 for .NET.
- In Windows 10 open the Windows Start menu, click on SpreadsheetGear 2017 and click on SpreadsheetGear Explorer C# Sample or SpreadsheetGear Explorer VB Sample.
- In Windows 8 or Windows 8.1 navigate to the Windows Start Screen, start typing "SpreadsheetGear Explorer", and click on SpreadsheetGear Explorer C# Sample or SpreadsheetGear Explorer VB Sample.
- In earlier versions of Windows open the Windows Start menu, click on All Programs, click on SpreadsheetGear 2017, click on SpreadsheetGear 2017 for .NET, click on SpreadsheetGear Explorer C# Sample or SpreadsheetGear Explorer VB Sample.
- If you are opening the solution in Visual Studio 2012, Visual Studio 2013, Visual Studio 2015 or Visual Studio 2017 for the first time, follow the steps in the Visual Studio Conversion Wizard to convert the solution to Visual Studio 2012 / 2013 / 2015 / 2017.
- For the best performance, make sure that the current configuration is set to Release rather than Debug.
- Open the Build menu and choose Rebuild Solution.
- Open the Debug menu and choose Start Without Debugging to run SpreadsheetGear Explorer.
- In SpreadsheetGear Explorer, choose among the various samples on the left. Note that many of the samples require user input, such as clicking on a Run Sample button or entering the specified text or number into a cell.
- Source code can be viewed and copied directly at runtime from the source viewer below each sample.
- It is important to note that the SpreadsheetGear Explorer samples demonstrate the usage of GetLock and ReleaseLock which are required when using the WorkbookView control with background calculation enabled. ASP.NET developers will almost never use GetLock and ReleaseLock, and at the time of this writing none of the ASP.NET samples provided by SpreadsheetGear LLC use GetLock and ReleaseLock.
Troubleshooting SpreadsheetGear Explorer
You may run into problems with the SpreadsheetGear Explorer samples. Common problems fall into one of two categories:
- You have insufficient permissions to modify the SpreadsheetGear Explorer sample solutions and source files. This is particularly likely when running Windows with User Access Control (UAC) enabled. If this is the case, you may not be able to successfully run the Visual Studio 2012, Visual Studio 2013, Visual Studio 2015 or Visual Studio 2017 Conversion Wizard and modify the SpreadsheetGear Explorer sample source files.
- You have a version of the Visual Studio IDE installed but it does not support the C# Windows Forms projects and / or VB Windows Forms projects. This is the case with some of the Visual Studio Express versions as well as some 3rd party software which installs a limited version of the Visual Studio IDE.
To avoid these problems, manually run Visual Studio as an Administrator and open the SpreadsheetGear Explorer Sample solution from 'INSTALLDIR\SpreadsheetGear\SpreadsheetGear 2017 for .NET\DotNet20\Samples\' where INSTALLDIR is typically 'C:\Program Files\' on Windows x86 or 'C:\Program Files (x86)\' on Windows x64.
As an alternative, you may prefer to copy the samples to a directory in which you have the appropriate permissions and then open them in Visual Studio.