Hello,
I am working with Aspose.Cell.GridWeb. I am trying to save the worksheets to an excel file. But it is throwing an exception. The exception details are as below:
Message "Row number or column number cannot be zero"
Stacktrace at .Merge(Int32 firstRow, Int32 firstColumn, Int32 rowNumber, Int32 columnNumber)
at Ӡ.(Object ܰ, WebWorksheets ੶, Boolean , ༐ )
at Aspose.Cells.GridWeb.Data.WebWorksheets.SaveToExcelFile(String targetFile)
The code snippet is as follows:
System.IO.MemoryStream mstream = new System.IO.MemoryStream();
GridWeb1.WebWorksheets.SaveToExcelFile(mstream);
mstream.Flush();
System.IO.FileStream fout = new System.IO.FileStream("d:\\out.xls", System.IO.FileMode.Create);
fout.Write(mstream.GetBuffer(), 0, (int)mstream.Length);
fout.Close();
Please help.
Thanks.