GridWeb.ImportExcelFile throws exception "Object reference not set to an instance of an object"

wahid.choudhury:
Hi,
I'm now testing the new version you suggested. But I've one important query. GridWeb.ModifiedCells contains a collection of WebCell. Is there any way to get the corresponding sheet name of the modified webcell?

Thanks.
Wahid
Hi,

Please download and use the latest version: Aspose.Cells for GridWeb v2.7.7.2002

Please refer to this thread.
Is there any way to get the corresponding sheet name of the modified webcell?

For your newer issues, please create newer thread.

Hi,
The latest version doesn’t work as it crashes to load a simple excel file.

For “Sheet Name with modified cell (s)”, I didn’t get any solution following link you provided. I need this urgent. Can you help?

Thanks.
Wahid

Hi,

The sheet name should be active sheet name of a gridweb control e.g

GridWeb1.WebWorksheets.ActiveSheet.Name

Hi,
Thanks. Modified cells problem solved. Now I need a link to latest stable release of the component. Also please provide the latest acw_client folder with latest scripts. After having a quick look I’m going to buy the license.

Thanks.
Wahid

Hi,

That’s good to know your problem is resolved.

Please download the latest release from this link:
Aspose.Cells
for GridWeb v2.7.7.2002



It also contains the latest acw_client with latest script.

Hi,
I’m still facing following problem while trying to import the attached excel file:
Message: Exception type: System.InvalidOperationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Exception message: Failed to compare two elements in the array.
Inner exception 1 type: System.ArgumentException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Inner exception 1 message: Object must be the same type as the enum. The type passed in was ‘System.String’; the enum type was ‘?.?’.
Stacktrace: at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)
at System.Collections.SortedList.IndexOfKey(Object key)
at System.Collections.SortedList.get_Item(Object key)
at Aspose.Cells.GridWeb.Data.WebWorksheets.?(Boolean )
at ?.?.?(WebWorksheets )
at Aspose.Cells.GridWeb.Data.WebWorksheets.ImportExcelFile(String fileName)
at UsingAsposeGrid._Default.LoadDefaultGrid() in D:\Projects\My Projects\UsingAsposeGrid\UsingAsposeGrid\Default.aspx.cs:line 80
Class: UsingAsposeGrid._Default
Method: LoadDefaultGrid
LineNumber: 80
StackTrace: at mr.util.logging.InlineProfiler.GetExtendedPropertiesForException(Boolean appendStackTrace) in D:\Projects\My Projects\UsingAsposeGrid\mr.util\logging\InlineProfiler.cs:line 320
at mr.util.logging.InlineProfiler.WriteException(Exception exception, String[] categories) in D:\Projects\My Projects\UsingAsposeGrid\mr.util\logging\InlineProfiler.cs:line 200
at mr.util.logging.LogHelper.WriteException(Exception exception, String[] categories) in D:\Projects\My Projects\UsingAsposeGrid\mr.util\logging\LogHelper.cs:line 105
at UsingAsposeGrid._Default.LoadDefaultGrid() in D:\Projects\My Projects\UsingAsposeGrid\UsingAsposeGrid\Default.aspx.cs:line 80
at UsingAsposeGrid._Default.Page_Load(Object sender, EventArgs e) in D:\Projects\My Projects\UsingAsposeGrid\UsingAsposeGrid\Default.aspx.cs:line 36
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\usingasposegrid\d28813f0\b2fd3b43\App_Web_vvg9navh.0.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

Am I missing anything?
Thanks.
Wahid

Hi,

Thanks for your reporting a problem.

I was able to replicate this problem using the latest version.

We have logged this issue in our database. We will look into this issue and once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-40786.

Below is a code and screenshot for a reference.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\Book1.xlsx”;


this.GridWeb1.WebWorksheets.ImportExcelFile(filePath);


Screenshot:

Hi,


Please try our previous fix v2.7.7.2001, it works fine with your file and is stable version.

In the mean time, we will continue to test/evaluate the latest fix v2.7.7.2002 to fix your issue and other elements (already logged ticket(s)).

Thank you.

Hi,
Can you provide me the link to buy the license? The old license which I was using for GridWeb_Version_2.5.3.2001. And it worked for Aspose.Cells_Version_5.1.4.0 component also. Should the new license will work for the cells component also?

Thanks.
Wahid

Hi,

Thanks for your posting and using Aspose.

Please contact Aspose.Purchase for purchasing license.

If your license date has not expired, then you can use the new component without any problem.

License date expires after 1 year from the date of your purchase. You can check the license expiry date by opening your license in a notepad.

But if your license date has expired, you will have to renew your license subscription.

Hi,


"The old license which I was using for GridWeb_Version_2.5.3.2001. And it worked for Aspose.Cells_Version_5.1.4.0 component also. Should the new license will work for the cells component also"

Yes, Aspose.Cells for .NET is a complete package that includes Aspose.Cells library and Grid Controls (Desktop + Web). If you purchase or upgrade the new license e.g Aspose.Cells.lic, it will work for both Aspose.Cells.dll (library) and Grid controls (GridDesktop + GridWeb).

Thank you.

Hi,
GridWeb crashes for the attached file. Please fix.
Thanks.
Wahid

Hi,

I was able to replicate the problem using the latest version:
Aspose.Cells
for GridWeb v2.7.7.2002



We will look into it and fix the bug and update you asap.

This issue has been logged as CELLSNET-40798.

Hi,
Is the issue resolved? I don’t have access to the CELLSNET-40798.

Thanks.
Wahid

Same issue with the attached file. Please fix.

Thanks.
Wahid

Hi,
After investigating I found that the GridWeb crashes if there is a simple formula in the workbook.

Thanks.
Wahid

GridWeb crashes for the attached file. Merged cells causing problem and it take infinite time to load. Please make sure that the latest version really improves.

Object must be the same type as the
enum. The type passed in was ‘System.String’; the enum type was ‘˜.’. at
System.Enum.CompareTo(Object target)
at
System.Collections.Comparer.Compare(Object a, Object b)
at
System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value,
IComparer comparer)


Please fix these as soon as possible. I bought the latest license and I’m on behind dates to publish the web site.

Thanks.
Wahid

Hi,

It seems all of these issues are related, so we have logged them against the issue id: CELLSNET-40798

We will investigate these issues and fix them.

At the moment, we do not have any update for you, but we have logged your comments.

Hopefully your issues will be fixed soon.

Hi,

Thanks for using Aspose.Cells for GridWeb.

Please download and try the latest fix: Aspose.Cells for GridWeb v2.7.7.2004 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-40798) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.