Free Support Forum - aspose.com

InsertRows() Method Error After Upgrade

Laurence,



After I upgraded from 3.5.3.3 to 3.8.1.0, I’m getting an “Object
reference not set …” error on the InsertRows() method. I’ve
attached the project – just run it and click “Make Excel”.



Thanks,

Natan

Hi Natan,

We have found and fixed this bug but haven't published a fix yet. Please try this attached version.

I’m still getting the error. Here’s the stack trace:



Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
Aspose.Cells.Font.set_Color(Color value)
Aspose.Cells.Font.Copy(Font source)
Aspose.Cells.Style.Copy(Style style)
Aspose.Cells.Cells.܀(Int32 ؉, Int32 ؊)
Aspose.Cells.Cells.InsertRows(Int32 rowIndex, Int32 rowNumber)
rdExcelTemplate.rdExcelTemplate.subCopyPatternBlock(PatternBlock pb, Int32 nOffset, String sWorksheet) in C:\rdExcelTemplate\rdExcelTemplate.vb:304
rdExcelTemplate.rdExcelTemplate.nRecursivelyFillTemplate(XmlElement xmlData, ArrayList alSubPatternBlocks, Int32 nCopyNum) in C:\rdExcelTemplate\rdExcelTemplate.vb:244
rdExcelTemplate.rdExcelTemplate.subOneWorksheetPerDataRow(XmlElement xmlData) in C:\rdExcelTemplate\rdExcelTemplate.vb:205
rdExcelTemplate.rdExcelTemplate.subMakeExcel(XmlElement xmlTemplateDefinition, XmlDocument xmlDataSource) in C:\rdExcelTemplate\rdExcelTemplate.vb:81
ExcelTemplateTest.Index.btMakePdf_Click(Object sender, EventArgs e) in c:\rdExcelTemplate\ExcelTemplateTest\index.aspx.vb:55
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain() +1281

Please try this version.

That worked. Thanks!