When I try to copy the "report" sheet from the attached template to a new workbook, I receive the following error.
System.NullReferenceException: Object reference not set to an instance of an object.
at Aspose.Cells.ಐ.ন(ಐ )
at Aspose.Cells.Cell.ు(Cell )
at Aspose.Cells.Cells.ন(Cells )
at Aspose.Cells.Worksheet.ন(Worksheet , Boolean )
at Aspose.Cells.Worksheet.Copy(Worksheet sourceSheet)
at WindowsApplication2.Form1.Form1_Load(Object sender, EventArgs e) in C:\Documents and Settings\jrozier\My Documents\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\Form1.vb:line 18
Code:
Dim x As New Aspose.Cells.Workbook
Dim y As New Aspose.Cells.Workbook
x.Open("C:\test\pRPT92.xls")
y.Worksheets.Add("NewSheet")
y.Worksheets("NewSheet").Copy(x.Worksheets("report"))
y.Save("C:\test\prpt921.xls")