We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

GridWeb Example

I am simply trying to create a GridWeb page that I can then open an existing Excel spreadsheet.

I do have a license and have even added the call to the license but it never makes it to the section (Page_Load).

I have tried to run the examples and download them from the website but they always fail to download and install. So, I attempted to just do something very basic.

However, to get things started,
I created a brand new Web Application (Visual Studio Express 2013 for Web)
I then added an Web Form to the empty project.
I then dragged the GridWeb control from the Toolbox to the Form

I hit Save, then Run… I get the following:
Object reference not set to an instance of an object.

[NullReferenceException: Object reference not set to an instance of an object.] ..”(MainWeb ) +91 Aspose.Cells.GridWeb.MainWeb.–() +100 Aspose.Cells.GridWeb.MainWeb.() +108 Aspose.Cells.GridWeb.MainWeb.OnPreRender(EventArgs er) +243 System.Web.UI.Control.PreRenderRecursiveInternal() +83 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Control.PreRenderRecursiveInternal() +155 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974

Hi Dan,

Thank you for contacting Aspose support.

We are looking into your presented scenario and we will shortly get back to you with updates in this regard.

Hi Dan,

Thank you for your patience with us.

We have evaluated the presented scenario on our side. We believe the NullReferenceException is caused due to the reason that you are not loading any spreadsheet onto the GridWeb control in Page_Load method. You may workaround the situation by either importing a spreadsheet to display in the GridWeb control using the ImportExcelFile method. Alternatively you may also clear the existing WebWorksheets and add a new one to start work with the GridWeb control. Attached to this post is a sample application demonstrating both scenarios.

Thanks for the example and feedback. I actually was getting exceptions just going into the configuration components.

The example you provided is all I was trying to do. I had to switch over to Chrome to get a clean run of the application – so I’m happy there. Now to figure out how much I can manipulate the display of existing spreadsheets (I used the commented out ImportExcelFile to load my own spreadsheet).

However, when launching, I did have some issues – UNRELATED that you may want to address. Using the default Internet Explorer, I receive a popup “unknown browser”. The code then breaks on the line:

new acwmain(document.getElementById(“gridWebCalculationArea”));

The popup shows this:

Unhandled exception at line 25, column 170 in http://localhost:20549/acw_client/acwmain.js

0x800a1391 - JavaScript runtime error: ‘XPathEvaluator’ is undefined

Hi Dan,

Good to know that you have bypassed the previously mentioned error. For your recent inquiry, I would request you to update the contents of acw_client folder with the ones available in the latest release of Aspose.Cells for .NET (Latest Version) . Please also upgrade the GridWeb component in order to avoid any compatibility issues.

In case the problem persists, please zip the sample application and attach it here for further investigation.