Free Support Forum -

Cell.StringValue returns garbled string

I am using v of Aspose Excel to read the attached file. The code to read that file is below. The Cell.StringValue property is returning a garbled string.

try { Aspose.Excel.Excel xl = new Aspose.Excel.Excel(); xl.Open(Server.MapPath("templates/deadline.xls")); Aspose.Excel.Cell[] cells = {xl.Worksheets[0].Cells["A1"], xl.Worksheets[0].Cells["B1"]}; if(cells[1].Type == Aspose.Excel.CellValueType.IsDateTime && cells[0].Type == Aspose.Excel.CellValueType.IsString && cells[1].DateTimeValue.AddDays(10) > System.DateTime.Now) { HtmlGenericControl ctl = new HtmlGenericControl("marquee"); ctl.Attributes.Add("scrollamount", "2"); ctl.Attributes.Add("scrolldelay", "120"); ctl.Attributes.Add("loop", "3"); ctl.Attributes.Add("width", "400"); ctl.InnerText = string.Format("{0} {1}", cells[0].StringValue, cells[1].DateTimeValue.ToLongDateString()); phMessage.Controls.Add(ctl); } } catch { // do nothing when file does not exist, etc. }

Only one cell returns a garbled string, right? It is an evaluation limitation. Please check .

It certainly was! I feel shame. Huh? [:^)]Embarrassed [:$]