Hi,
I try to use the AddCopy but it seems to have some trouble
Here is my code :
Dim oWorkbook As Aspose.Cells.Workbook = New Aspose.Cells.Workbook
Dim lIndex As Integer = 0
oWorkbook.Worksheets(lIndex).Name = “Test”
lIndex = oWorkbook.Worksheets.AddCopy(“Test”)
oWorkbook.Save(“c:\test.xls”)
I tryied with index but it isn’t working as well
My cong is ASP.Net 1.1 with Aspose.Cells 4.0.1.0
My second question is : have you a newsletter or rss to know when you upgrade the components
Regards,
Guillaume
It crashes on -> lIndex = oWorkbook.Worksheets.AddCopy(“Test”)
and I forgot to put the error message :
Type : System.NullReferenceException
Message : Object reference not set to an
instance of an object.
Trace :
at Aspose.Cells.Cells.ۺ(Cells ֢) at
Aspose.Cells.Worksheet.ބ(Worksheet ؤ) at Aspose.Cells.Worksheet.Copy(Worksheet
sourceSheet) at Aspose.Cells.Worksheets.AddCopy(Int32 sheetIndex) at
Aspose.Cells.Worksheets.AddCopy(String sheetName) at
ApplicationWebTest.TestAsposeCells.btnCopieFeuille_Click(Object sender,
EventArgs e) in
I also tried like this, and it crash…
Dim oWorkbook As Aspose.Cells.Workbook = New Aspose.Cells.Workbook
Dim lIndex As Integer = 0
oWorkbook.Worksheets(lIndex).Name = "Test"
lIndex = oWorkbook.Worksheets.Add
oWorkbook.Worksheets(lIndex).Copy(oWorkbook.Worksheets(“Test”))
What did I miss
Please try this attached version. We will release a public fix soon.
http://www.aspose.com/Community/blogs/laurence.chen/rss.aspx?CategoryID=1020
I tried, it’s working.
thanks