SaveToExcelFile in gridWeb

Hello,


I'm using the GridWeb version 2.0.0.2001 (product version 2008.05.09 in the Aspose.Grid.Web.dll properties).

We have a customer that has IIS6 running in a windows server 2003 R2 Std with SP2.

When we use the function SaveToExcelFile we're receiving an exception with text "Object reference not set to an instance of an object."

The code is base in the sample you provide in your web site, like this:

--- begin

Dim filename As String = System.IO.Path.GetTempPath() & "file.xls"

Dim w As WebWorksheet
For Each w In gdEscala.WebWorksheets
If w.ID <> lblIdEscala.Text Then
w.Visible = False
End If
Next

Dim mstream As MemoryStream = New MemoryStream()
gdEscala.WebWorksheets.SaveToExcelFile(mstream) <--- exception here!!!
mstream.Flush()

Dim fout As FileStream = New FileStream(filename, FileMode.Create)
fout.Write(mstream.GetBuffer(), 0, mstream.Length)
fout.Close()

-- end


We have tried to change to save directly to a file, like this:

-- begin

Dim filename As String = System.IO.Path.GetTempPath() & "file.xls"

Dim w As WebWorksheet
For Each w In gdEscala.WebWorksheets
If w.ID <> lblIdEscala.Text Then
w.Visible = False
End If
Next


gdEscala.WebWorksheets.SaveToExcelFile(filename) <--- exception here!!!

-- end

The result was the same exception at the same code.

What could be wrong? We're using the same code in other customers, without problems.

Many thanks,

António Carvalho


Hi,


Please upgrade to and try installing our latest version Aspose.Cells.GridWeb v2.6.3.2000 downloading the latest Aspose.Cells for .NET v7.0.1 package:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry328122.aspx

If you still find the issue, kindly do create a simple project, zip it and post it here, we will check the issue soon.

Thank you.

Hi,


I think this has to do with the data that we are loagind to the grid.

We're loading the data manualy from several sources; also, we're using some hidden tabs to load aditional data.

In some cases it seems to be the data that we are loading, but I can't fugure out what is wrong. In other cases, the file is being exported without errors.

In other case, I'm getting the exception "Row number or column number cannot be zero", and it also seems to do with the data the the grid has...

I was hopping you could give me an hint on what could be wrong, as it's not simple to produce a sample that would reproduce the error.


Many thanks,

António Carvalho

Hi,

Please create a simple C# sample application project that replicate this problem using the latest version of Aspose.Cells for GridWeb.

We will look into it and if it is a bug we will forward the issue to development team and update you asap.