Ok, So we are doing something that cannot be made simpler.
We are inserting rows in an excel file. This is a .xlsx file containing some sensitive information. We need to insert rows. So we use the following API:
wsheet.Cells.InsertRows(12, tblEntityList.Rows.Count, True)
This cannot be more simpler. And yet we get the following exception:
"Object reference not set to an instance of an object."
Here is the stacktrace:
at Aspose.Cells.ConditionalFormattings.xc62b07e82af56ce0(Int32 x78a7603cacf2ae22, Int32 xa21e294c3adee41c)
at Aspose.Cells.Cells.InsertRows(Int32 rowIndex, Int32 rowNumber)
at Aspose.Cells.Cells.InsertRows(Int32 rowIndex, Int32 rowNumber, Boolean updateReference)
at PS.xxxx.Web.FederalK1Report.GeneralFederalK1Data(Int32 entityID, String legalName, Object& wbook) in :\Projects\TFSBS09xxxxxxx:line 39
…
…
We are using version 4.8.1.0 of Aspose.
Please do not ask us to check object references because we have double checked and they are all valid objects. Not null.
What is happening??