Free Support Forum - aspose.com

Excel.Replace Method (String- DataTable)

If the first column of the data table is not numeric (char, varchar, nvarchar) then I get an error. If I stick in an extra column at the brginning, the error goes away and it works.

I am using Version 1.5.9.0


Here is the error message:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.


Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
Aspose.Excel.Record.a42b0.AddString(String inputString, String previousString, Cell cell)
Aspose.Excel.Cell.PutValue(String H7)
Aspose.Excel.I1.A28(Cell cell, DataTable insertTable)
Aspose.Excel.I1.Replace(String placeHolder, DataTable insertTable)
Aspose.Excel.Excel.Replace(String placeHolder, DataTable insertTable)
Star.xlsAdditionAndAdjustment.PopulateData() in C:\Projects\Playground\STAR\Reports\xlsAdditionAndAdjustment.aspx.vb:66
Star.xlsAdditionAndAdjustment.Page_Load(Object sender, EventArgs e) in C:\Projects\Playground\STAR\Reports\xlsAdditionAndAdjustment.aspx.vb:49
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731


Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

Hi, thanks for your feedback.

Yes, it’s a bug. I have fixed it in the newest Hot Fix 1.5.10. Please download it.

Thanks a ton. You guys rock. 7 hours from a bug report to a new DLL release is just awesome.