Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Closed Issue: NullReferenceException on InsertRowsBelow() after CopyTo() [8522]

$
0
0
Found **NullReferenceException** when trying insert rows into copied sheet.

```
class Program
{
static void Main(string[] args)
{
XLWorkbook wbk = new XLWorkbook(@"C:\MySheet.xlsx");
IXLWorksheets shts = wbk.Worksheets;
IXLWorksheet sht = shts.First();
sht.CopyTo("new_sheet");
sht = shts.Last();
sht.Row(1).InsertRowsBelow(1);
wbk.Save();
}
```
Comments: Please try the latest version of ClosedXML (v0.87.1 at this stage). If you still experience the issue, log it on the new GitHub page.

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>