Free Support Forum - aspose.com

AddCopy Appears to Not Work

I'm currently working on a project that opens an Excel template (created in Excel 2007, but saved down to Excel 2003), dumps the data in the template, makes a copy of the first sheet and attempts to add more data to the newly copied sheet. I've attached the template so you can see what I'm working with.

When I try to copy the sheet using AddCopy, the sheet is not copied. Attached is an example of my results. I'm not working with an evaluation copy and the version of the Aspose.Cells.dll I have appears to be 4.4.3.1. The code I'm using to copy the worksheet is also attached.

Am I doing something wrong?

Hi,

Thanks for providing us the template file and sample code.

Well, since you are using some older version of the product (v4.4.3.1), this might not be supported as your worksheet contains chart in it.
But the latest Aspose.Cells versions can perform the task fine. I have tried using your template files with the latest fix of the product i.e Aspose.Cells for .NET v4.8.1.1 and it works fine. The Worksheets.AddCopy() method works as expected.

Please try the attached version

Thank you.

Thanks for sending me the updated DLL. Unfortunately, it's still not working for me. Also, I now get the evaluation warning, whereas I didn't before (I have a licensed copy of Aspose.Total and before I even create the Workbook object, I've passed the license path to the License object). Have I done something wrong when updating the Aspose.Cells.dll? What's the TLB file that was also included in the zip file? Do I need to do something with that, as well?

I do appreciate your help. :)

Nevermind. I got it (and feel kind of stupid now). It's adding the copied sheet as the very last sheet. I need to modify my template to delete the sheets behind the initial one and it should work as expected.

However, I'm still getting the evaluation warning with the newer DLL. Will we need to buy an upgraded license or something?

Hi,

Yes, you do need to upgrade your subscription to use latest versions of Aspose.Cells for .NET to eliminate evaluation warning sheet and to work with the component with full capacity.

I think your license “Aspose.Total.lic” might be expired to use the latest versions/fixes of Aspose.Cells for .NET. For your information, any of the fixes / new releases will work fine unless your license is not expired (license expiry date can be seen in the license file opening the license file into notepad). You may use our latest versions 4.8.1.x if your subscription allows this, you may open your license file into notepad and check the expiry date. When you purchase the license, you are eligible to use versions / bug fixes of the products that are released in the next whole year. But if a version/fix is released after your subscription expiry, you need to upgrade your subscription then.

Regarding tlb file, it is type library file that describes the types detail. We, now, provide .tlb file for our COM users who use Aspose.Cells for .NET component in the environment/languages other than .NET’s, e.g COM clients…JavaScript, VBScript, VB6.0 etc. The .tlb file is a type library file which describes all the detail of the component’s types / API etc for the COM clients, they may open it into vs.net and get the details for their need. And, you don’t need to use this file, if your platform is .NET :slight_smile:

Have a good day!


Thank you.