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