First of all, I’m using the latest version of your Aspose.cells dll (8.7.0.0). Each time I try to copy the attached Excel workbook into a new workbook I get a CellsException.
I attach you to this post a sample project which shows the described issue. Please launch it and you will see the exception stack.
Thanks for providing us sample project with template file.
After an initial test, I observed the issue as you mentioned by using your sample project with you template file. I found an exception “Invalid text of the defined name.” when copying worksheet.
e.g Sample code:
… Workbook targetWb = new Workbook(); Workbook srcWb = OpenWorkbook(srcPath); for (int i = 0; i < srcWb.Worksheets.Count; i++) { Worksheet ws = srcWb.Worksheets[i]; int index = targetWb.Worksheets.Add(); targetWb.Worksheets[index].Copy(ws);//Exception occurred. targetWb.Worksheets[index].Name = ws.Name; } targetWb.Save(targetPath);
…
I have logged a ticket with an id “CELLSNET-44225” for your issue. We will look into it soon.
Once we have any update on it, we will let you know here.
It is to inform you that we have fixed your issue CELLSNET-44225 now. We will soon provide the fix after performing QA and including other enhancements and fixes.