I have the following code snippet - when running I get the following error:
the error is in the excel.Save call - any ideas?
Thanks,
travis
System.Exception: Unknown error at Aspose.Excel.Record.ஒ.ஔ(Worksheet ֤, Int32 ߙ, Int32 ֥, Int32 க, Int32 , Int32 ) at Aspose.Excel.Worksheet.֙(ڷ Ԏ) at Aspose.Excel.Worksheets.֕(ڷ Ԏ) at Aspose.Excel.Worksheets.֚(FileFormatType ֘) at Aspose.Excel.Worksheets.֙(Stream Ԏ, FileFormatType ֘) at Aspose.Excel.Worksheets.֙(String ֜, SaveType ֝, FileFormatType ֘, HttpResponse ֞) at Aspose.Excel.Excel.Save(String fileName, SaveType saveType, FileFormatType fileFormatType, HttpResponse response) at Vci.Mosaic.Sunesis.Reports.AsposeExcel.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\sunesismosaic\sunesis\reports\asposeexcel.aspx.cs:line 115
========
string xml = Request["MetaXml"];
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
XmlElement root = doc.DocumentElement;
XmlNode data;
data = root.SelectSingleNode("/grid/data");
XmlNodeReader reader = new XmlNodeReader(data);
DataSet ds = new DataSet();
ds.ReadXml(reader);
Aspose.Excel.Excel excel = new Aspose.Excel.Excel();
//hard code Coumpound Images
int rowCount = 1;
Pictures pics = excel.Worksheets[0].Pictures;
excel.Worksheets[0].Cells.SetColumnWidth(0,45);
//excel.Worksheets[0].Cells.SetColumnWidth(10,90);
//excel.Worksheets[0].Cells.SetColumnWidth(11,90);
string url = null;
foreach ( DataRow row in ds.Tables["row"].Rows)
{
excel.Worksheets[0].Cells.SetRowHeight(rowCount,350);
url = "http://localhost/SunesisMosaic/image.aspx?Guid=" + row["PlotImage_AssayAURORAAHTRF"];
System.Net.HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url);
myHttpWebRequest.CookieContainer = new CookieContainer();
myHttpWebRequest.CookieContainer.SetCookies(new System.Uri(url),this.Request.Headers["Cookie"]);
// Sends the HttpWebRequest and waits for the response.
System.Net.HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();
// Gets the stream associated with the response.
Stream receiveStream = myHttpWebResponse.GetResponseStream();
pics.Add(rowCount,10,receiveStream);
myHttpWebResponse.Close();
rowCount++;
}
excel.Save("AuroraAB.xls", SaveType.OpenInExcel, FileFormatType.Excel2003, this.Response);